25 m_opaque_up = std::make_unique<lldb_private::SaveCoreOptions>();
70 const auto file_spec =
m_opaque_up->GetOutputFile();
114 std::make_shared<lldb_private::ThreadCollection>(
126 llvm::Expected<uint64_t> expected_bytes =
128 if (!expected_bytes) {
135 return *expected_bytes;
140 llvm::Expected<lldb_private::CoreFileMemoryRanges> memory_ranges =
142 if (!memory_ranges) {
143 llvm::consumeError(memory_ranges.takeError());
148 for (
const auto &range : *memory_ranges) {
150 nullptr, range.GetRangeBase(), range.GetRangeEnd(),
151 range.data.lldb_permissions,
true);
152 memory_region_infos.
Append(region_info);
155 return memory_region_infos;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT_VA(...)
const lldb_private::FileSpec & ref() const
void Append(lldb::SBMemoryRegionInfo ®ion)
lldb_private::MemoryRegionInfo & ref()
lldb::ProcessSP GetSP() const
SBThreadCollection GetThreadsToSave() const
Get an unsorted copy of all threads to save.
bool RemoveThread(lldb::SBThread thread)
Remove a thread from the list of threads to save.
void SetStyle(lldb::SaveCoreStyle style)
Set the Core dump style.
const SBSaveCoreOptions & operator=(const lldb::SBSaveCoreOptions &rhs)
void Clear()
Reset all options.
void SetOutputFile(SBFileSpec output_file)
Set the output file path.
lldb_private::SaveCoreOptions & ref() const
friend class SBThreadCollection
uint64_t GetCurrentSizeInBytes(SBError &error)
Get the current total number of bytes the core is expected to have excluding the overhead of the core...
SBError SetProcess(lldb::SBProcess process)
Set the process to save, or unset if supplied with a default constructed process.
SBError AddMemoryRegionToSave(const SBMemoryRegionInfo ®ion)
Add a memory region to save in the core file.
SBError AddThread(lldb::SBThread thread)
Add a thread to save in the core file.
const char * GetPluginName() const
Get the Core dump plugin name, if set.
lldb::SaveCoreStyle GetStyle() const
Get the Core dump style, if set.
SBError SetPluginName(const char *plugin)
Set the plugin name.
std::unique_ptr< lldb_private::SaveCoreOptions > m_opaque_up
SBMemoryRegionInfoList GetMemoryRegionsToSave() const
Get an unsorted copy of all memory regions to save.
SBProcess GetProcess() const
Get the process to save, if the process is not set an invalid SBProcess will be returned.
SBFileSpec GetOutputFile() const
Get the output file spec.
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
const char * Intern(llvm::StringRef str) const
static StringPoolRef GetSystemPool()
The system pool. Only valid between Initialize and Terminate.
class LLDB_API SBFileSpec
class LLDB_API SBMemoryRegionInfoList
std::shared_ptr< lldb_private::ThreadCollection > ThreadCollectionSP