19 if (!name || !name[0]) {
25 error.SetErrorStringWithFormat(
26 "plugin name '%s' is not a valid ObjectFile plugin name", name);
46const std::optional<lldb_private::FileSpec>
59 if (!process_sp->IsValid()) {
60 error.SetErrorString(
"Cannot assign an invalid process.");
76 error.SetErrorString(
"invalid thread");
82 error.SetErrorString(
"Cannot add a thread from a different process.");
107 std::string error_str;
109 error_str +=
"Cannot save a full core with a subset of threads\n";
112 error_str +=
"Cannot save core for process using supplied core options. "
113 "Options were constructed targeting a different process. \n";
115 if (!error_str.empty())
116 error.SetErrorString(error_str);
static llvm::raw_ostream & error(Stream &strm)
static bool IsRegisteredObjectFilePluginName(llvm::StringRef name)
lldb::ProcessSP m_process_sp
Status SetProcess(lldb::ProcessSP process_sp)
lldb_private::Status SetPluginName(const char *name)
bool RemoveThread(lldb::ThreadSP thread_sp)
const std::optional< lldb_private::FileSpec > GetOutputFile() const
lldb::SaveCoreStyle GetStyle() const
Status AddThread(lldb::ThreadSP thread_sp)
std::optional< std::string > m_plugin_name
void SetStyle(lldb::SaveCoreStyle style)
std::optional< std::string > GetPluginName() const
std::optional< lldb::SaveCoreStyle > m_style
void SetOutputFile(lldb_private::FileSpec file)
void ClearProcessSpecificData()
std::unordered_set< lldb::tid_t > m_threads_to_save
Status EnsureValidConfiguration(lldb::ProcessSP process_sp) const
bool ShouldThreadBeSaved(lldb::tid_t tid) const
std::optional< lldb_private::FileSpec > m_file
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::Process > ProcessSP