24 m_opaque_up = std::make_unique<lldb_private::SaveCoreOptions>();
69 const auto file_spec =
m_opaque_up->GetOutputFile();
113 std::make_shared<lldb_private::ThreadCollection>(
125 llvm::Expected<uint64_t> expected_bytes =
127 if (!expected_bytes) {
134 return *expected_bytes;
139 llvm::Expected<lldb_private::CoreFileMemoryRanges> memory_ranges =
141 if (!memory_ranges) {
142 llvm::consumeError(memory_ranges.takeError());
147 for (
const auto &range : *memory_ranges) {
149 nullptr, range.GetRangeBase(), range.GetRangeEnd(),
150 range.data.lldb_permissions,
true);
151 memory_region_infos.
Append(region_info);
154 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.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
class LLDB_API SBFileSpec
class LLDB_API SBMemoryRegionInfoList
std::shared_ptr< lldb_private::ThreadCollection > ThreadCollectionSP