LLDB mainline
|
#include <SaveCoreOptions.h>
Public Member Functions | |
SaveCoreOptions () | |
~SaveCoreOptions ()=default | |
lldb_private::Status | SetPluginName (const char *name) |
std::optional< std::string > | GetPluginName () const |
void | SetStyle (lldb::SaveCoreStyle style) |
lldb::SaveCoreStyle | GetStyle () const |
void | SetOutputFile (lldb_private::FileSpec file) |
const std::optional< lldb_private::FileSpec > | GetOutputFile () const |
Status | SetProcess (lldb::ProcessSP process_sp) |
Status | AddThread (lldb::ThreadSP thread_sp) |
bool | RemoveThread (lldb::ThreadSP thread_sp) |
bool | ShouldThreadBeSaved (lldb::tid_t tid) const |
bool | HasSpecifiedThreads () const |
Status | EnsureValidConfiguration (lldb::ProcessSP process_sp) const |
const MemoryRanges & | GetCoreFileMemoryRanges () const |
void | AddMemoryRegionToSave (const lldb_private::MemoryRegionInfo ®ion) |
void | Clear () |
Private Member Functions | |
void | ClearProcessSpecificData () |
Private Attributes | |
std::optional< std::string > | m_plugin_name |
std::optional< lldb_private::FileSpec > | m_file |
std::optional< lldb::SaveCoreStyle > | m_style |
lldb::ProcessSP | m_process_sp |
std::unordered_set< lldb::tid_t > | m_threads_to_save |
MemoryRanges | m_regions_to_save |
Definition at line 24 of file SaveCoreOptions.h.
|
inline |
Definition at line 26 of file SaveCoreOptions.h.
|
default |
void SaveCoreOptions::AddMemoryRegionToSave | ( | const lldb_private::MemoryRegionInfo & | region | ) |
Definition at line 109 of file SaveCoreOptions.cpp.
References lldb_private::MemoryRegionInfo::GetRange(), lldb_private::RangeVector< B, S, N >::Insert(), and m_regions_to_save.
Status SaveCoreOptions::AddThread | ( | lldb::ThreadSP | thread_sp | ) |
Definition at line 73 of file SaveCoreOptions.cpp.
References error(), lldb_private::Status::FromErrorString(), m_process_sp, and m_threads_to_save.
void SaveCoreOptions::Clear | ( | ) |
Definition at line 141 of file SaveCoreOptions.cpp.
References lldb_private::RangeVector< B, S, N >::Clear(), m_file, m_plugin_name, m_process_sp, m_regions_to_save, m_style, and m_threads_to_save.
Referenced by CommandObjectProcessSaveCore::CommandOptions::OptionParsingStarting().
|
private |
Definition at line 135 of file SaveCoreOptions.cpp.
References m_threads_to_save.
Referenced by SetProcess().
Status SaveCoreOptions::EnsureValidConfiguration | ( | lldb::ProcessSP | process_sp | ) | const |
Definition at line 118 of file SaveCoreOptions.cpp.
References error(), lldb::eSaveCoreFull, GetStyle(), m_process_sp, and m_threads_to_save.
Referenced by lldb_private::PluginManager::SaveCore().
const MemoryRanges & SaveCoreOptions::GetCoreFileMemoryRanges | ( | ) | const |
Definition at line 114 of file SaveCoreOptions.cpp.
References m_regions_to_save.
Referenced by GetUserSpecifiedCoreFileSaveRanges().
const std::optional< lldb_private::FileSpec > SaveCoreOptions::GetOutputFile | ( | ) | const |
Definition at line 47 of file SaveCoreOptions.cpp.
References m_file.
Referenced by lldb_private::PluginManager::SaveCore(), ObjectFileMachO::SaveCore(), ObjectFileMinidump::SaveCore(), ObjectFilePECOFF::SaveCore(), and lldb_private::SaveMiniDump().
std::optional< std::string > SaveCoreOptions::GetPluginName | ( | ) | const |
Definition at line 38 of file SaveCoreOptions.cpp.
References m_plugin_name.
Referenced by lldb_private::PluginManager::SaveCore().
lldb::SaveCoreStyle SaveCoreOptions::GetStyle | ( | ) | const |
Definition at line 42 of file SaveCoreOptions.cpp.
References lldb::eSaveCoreUnspecified, and m_style.
Referenced by lldb_private::Process::CalculateCoreFileSaveRanges(), CreateAllImageInfosPayload(), EnsureValidConfiguration(), ObjectFileMachO::SaveCore(), and ObjectFileMinidump::SaveCore().
bool SaveCoreOptions::HasSpecifiedThreads | ( | ) | const |
Definition at line 105 of file SaveCoreOptions.cpp.
References m_threads_to_save.
Referenced by lldb_private::Process::CalculateCoreFileSaveRanges().
bool SaveCoreOptions::RemoveThread | ( | lldb::ThreadSP | thread_sp | ) |
Definition at line 94 of file SaveCoreOptions.cpp.
References m_threads_to_save.
void SaveCoreOptions::SetOutputFile | ( | lldb_private::FileSpec | file | ) |
Definition at line 36 of file SaveCoreOptions.cpp.
References m_file.
Referenced by CommandObjectProcessSaveCore::DoExecute().
Status SaveCoreOptions::SetPluginName | ( | const char * | name | ) |
Definition at line 17 of file SaveCoreOptions.cpp.
References error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::PluginManager::IsRegisteredObjectFilePluginName(), and m_plugin_name.
Referenced by CommandObjectProcessSaveCore::CommandOptions::SetOptionValue().
Status SaveCoreOptions::SetProcess | ( | lldb::ProcessSP | process_sp | ) |
Definition at line 51 of file SaveCoreOptions.cpp.
References ClearProcessSpecificData(), error(), lldb_private::Status::FromErrorString(), and m_process_sp.
void SaveCoreOptions::SetStyle | ( | lldb::SaveCoreStyle | style | ) |
Definition at line 34 of file SaveCoreOptions.cpp.
References m_style.
Referenced by ObjectFileMachO::SaveCore(), ObjectFileMinidump::SaveCore(), and CommandObjectProcessSaveCore::CommandOptions::SetOptionValue().
bool SaveCoreOptions::ShouldThreadBeSaved | ( | lldb::tid_t | tid | ) | const |
Definition at line 98 of file SaveCoreOptions.cpp.
References m_threads_to_save.
Referenced by lldb_private::Process::CalculateCoreFileThreadList(), SaveDynamicLoaderSections(), and SaveOffRegionsWithStackPointers().
|
private |
Definition at line 56 of file SaveCoreOptions.h.
Referenced by Clear(), GetOutputFile(), and SetOutputFile().
|
private |
Definition at line 55 of file SaveCoreOptions.h.
Referenced by Clear(), GetPluginName(), and SetPluginName().
|
private |
Definition at line 58 of file SaveCoreOptions.h.
Referenced by AddThread(), Clear(), EnsureValidConfiguration(), and SetProcess().
|
private |
Definition at line 60 of file SaveCoreOptions.h.
Referenced by AddMemoryRegionToSave(), Clear(), and GetCoreFileMemoryRanges().
|
private |
Definition at line 57 of file SaveCoreOptions.h.
Referenced by Clear(), GetStyle(), and SetStyle().
|
private |
Definition at line 59 of file SaveCoreOptions.h.
Referenced by AddThread(), Clear(), ClearProcessSpecificData(), EnsureValidConfiguration(), HasSpecifiedThreads(), RemoveThread(), and ShouldThreadBeSaved().