61 : m_opaque_wp(process_sp) {
85 ProcessSP process_sp(
GetSP());
95 ProcessSP process_sp(
GetSP());
114 return this->
operator bool();
116SBProcess::operator bool()
const {
119 ProcessSP process_sp(m_opaque_wp.lock());
120 return ((
bool)process_sp && process_sp->IsValid());
124 const char *stdin_path,
const char *stdout_path,
125 const char *stderr_path,
126 const char *working_directory,
127 uint32_t launch_flags,
bool stop_at_entry,
130 working_directory, launch_flags, stop_at_entry,
error);
132 ProcessSP process_sp(
GetSP());
134 std::lock_guard<std::recursive_mutex> guard(
135 process_sp->GetTarget().GetAPIMutex());
138 launch_flags |= eLaunchFlagStopAtEntry;
141 FileSpec(working_directory), launch_flags);
142 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
149 error.SetError(process_sp->Launch(launch_info));
151 error.SetErrorString(
"must be in eStateConnected to call RemoteLaunch");
154 error.SetErrorString(
"unable to attach pid");
157 return error.Success();
164 ProcessSP process_sp(
GetSP());
166 std::lock_guard<std::recursive_mutex> guard(
167 process_sp->GetTarget().GetAPIMutex());
171 error.SetError(process_sp->Attach(attach_info));
173 error.SetErrorString(
174 "must be in eStateConnected to call RemoteAttachToProcessWithID");
177 error.SetErrorString(
"unable to attach pid");
180 return error.Success();
187 ProcessSP process_sp(
GetSP());
191 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
192 std::lock_guard<std::recursive_mutex> guard(
193 process_sp->GetTarget().GetAPIMutex());
194 num_threads = process_sp->GetThreadList().GetSize(can_update);
205 ProcessSP process_sp(
GetSP());
207 std::lock_guard<std::recursive_mutex> guard(
208 process_sp->GetTarget().GetAPIMutex());
209 thread_sp = process_sp->GetThreadList().GetSelectedThread();
222 ProcessSP process_sp(
GetSP());
224 std::lock_guard<std::recursive_mutex> guard(
225 process_sp->GetTarget().GetAPIMutex());
226 thread_sp = process_sp->CreateOSPluginThread(tid, context);
238 ProcessSP process_sp(
GetSP());
240 target_sp = process_sp->GetTarget().shared_from_this();
241 sb_target.
SetSP(target_sp);
251 ProcessSP process_sp(
GetSP());
254 ret_val = process_sp->PutSTDIN(src, src_len,
error);
263 size_t bytes_read = 0;
264 ProcessSP process_sp(
GetSP());
267 bytes_read = process_sp->GetSTDOUT(dst, dst_len,
error);
276 size_t bytes_read = 0;
277 ProcessSP process_sp(
GetSP());
280 bytes_read = process_sp->GetSTDERR(dst, dst_len,
error);
289 size_t bytes_read = 0;
290 ProcessSP process_sp(
GetSP());
293 bytes_read = process_sp->GetAsyncProfileData(dst, dst_len,
error);
307 FileSP outfile = std::make_shared<NativeFile>(out,
false);
315 if (!out || !out->IsValid())
318 ProcessSP process_sp(
GetSP());
322 stream.
Printf(
"Process %" PRIu64
" %s\n",
331 ProcessSP process_sp(
GetSP());
335 ::snprintf(message,
sizeof(message),
"Process %" PRIu64
" %s\n",
345 ProcessSP process_sp(
GetSP());
347 std::lock_guard<std::recursive_mutex> guard(
348 process_sp->GetTarget().GetAPIMutex());
349 return process_sp->GetThreadList().SetSelectedThreadByID(
358 bool ret_val =
false;
359 ProcessSP process_sp(
GetSP());
361 std::lock_guard<std::recursive_mutex> guard(
362 process_sp->GetTarget().GetAPIMutex());
363 ret_val = process_sp->GetThreadList().SetSelectedThreadByID(tid);
372 bool ret_val =
false;
373 ProcessSP process_sp(
GetSP());
375 std::lock_guard<std::recursive_mutex> guard(
376 process_sp->GetTarget().GetAPIMutex());
377 ret_val = process_sp->GetThreadList().SetSelectedThreadByIndexID(index_id);
389 ProcessSP process_sp(
GetSP());
392 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
393 std::lock_guard<std::recursive_mutex> guard(
394 process_sp->GetTarget().GetAPIMutex());
395 thread_sp = process_sp->GetThreadList().GetThreadAtIndex(index, can_update);
406 ProcessSP process_sp(
GetSP());
409 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
410 std::lock_guard<std::recursive_mutex> guard(
411 process_sp->GetTarget().GetAPIMutex());
412 num_queues = process_sp->GetQueueList().GetSize();
424 ProcessSP process_sp(
GetSP());
427 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
428 std::lock_guard<std::recursive_mutex> guard(
429 process_sp->GetTarget().GetAPIMutex());
430 queue_sp = process_sp->GetQueueList().GetQueueAtIndex(index);
441 ProcessSP process_sp(
GetSP());
443 std::lock_guard<std::recursive_mutex> guard(
444 process_sp->GetTarget().GetAPIMutex());
445 if (include_expression_stops)
446 return process_sp->GetStopID();
448 return process_sp->GetLastNaturalStopID();
458 ProcessSP process_sp(
GetSP());
460 std::lock_guard<std::recursive_mutex> guard(
461 process_sp->GetTarget().GetAPIMutex());
462 event_sp = process_sp->GetStopEventForStopID(stop_id);
463 sb_event.
reset(event_sp);
472 if (ProcessSP process_sp =
GetSP()) {
473 std::lock_guard<std::recursive_mutex> guard(
474 process_sp->GetTarget().GetAPIMutex());
475 process_sp->ForceScriptedState(new_state);
483 ProcessSP process_sp(
GetSP());
485 std::lock_guard<std::recursive_mutex> guard(
486 process_sp->GetTarget().GetAPIMutex());
487 ret_val = process_sp->GetState();
497 ProcessSP process_sp(
GetSP());
499 std::lock_guard<std::recursive_mutex> guard(
500 process_sp->GetTarget().GetAPIMutex());
501 exit_status = process_sp->GetExitStatus();
510 ProcessSP process_sp(
GetSP());
514 std::lock_guard<std::recursive_mutex> guard(
515 process_sp->GetTarget().GetAPIMutex());
523 ProcessSP process_sp(
GetSP());
525 ret_val = process_sp->GetID();
534 ProcessSP process_sp(
GetSP());
536 ret_val = process_sp->GetUniqueID();
544 ProcessSP process_sp(
GetSP());
546 byteOrder = process_sp->GetTarget().GetArchitecture().GetByteOrder();
556 ProcessSP process_sp(
GetSP());
558 size = process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
568 ProcessSP process_sp(
GetSP());
571 std::lock_guard<std::recursive_mutex> guard(
572 process_sp->GetTarget().GetAPIMutex());
574 if (process_sp->GetTarget().GetDebugger().GetAsyncExecution())
575 sb_error.
ref() = process_sp->Resume();
577 sb_error.
ref() = process_sp->ResumeSynchronous(
nullptr);
588 ProcessSP process_sp(
GetSP());
590 std::lock_guard<std::recursive_mutex> guard(
591 process_sp->GetTarget().GetAPIMutex());
592 sb_error.
SetError(process_sp->Destroy(
false));
603 ProcessSP process_sp(
GetSP());
605 std::lock_guard<std::recursive_mutex> guard(
606 process_sp->GetTarget().GetAPIMutex());
607 sb_error.
SetError(process_sp->Halt());
618 ProcessSP process_sp(
GetSP());
620 std::lock_guard<std::recursive_mutex> guard(
621 process_sp->GetTarget().GetAPIMutex());
622 sb_error.
SetError(process_sp->Destroy(
true));
633 bool keep_stopped =
false;
634 return Detach(keep_stopped);
641 ProcessSP process_sp(
GetSP());
643 std::lock_guard<std::recursive_mutex> guard(
644 process_sp->GetTarget().GetAPIMutex());
645 sb_error.
SetError(process_sp->Detach(keep_stopped));
656 ProcessSP process_sp(
GetSP());
658 std::lock_guard<std::recursive_mutex> guard(
659 process_sp->GetTarget().GetAPIMutex());
660 sb_error.
SetError(process_sp->Signal(signo));
670 if (
auto process_sp =
GetSP())
679 ProcessSP process_sp(
GetSP());
681 process_sp->SendAsyncInterrupt();
690 ProcessSP process_sp(
GetSP());
693 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
694 std::lock_guard<std::recursive_mutex> guard(
695 process_sp->GetTarget().GetAPIMutex());
696 thread_sp = process_sp->GetThreadList().FindThreadByID(tid, can_update);
708 ProcessSP process_sp(
GetSP());
711 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
712 std::lock_guard<std::recursive_mutex> guard(
713 process_sp->GetTarget().GetAPIMutex());
715 process_sp->GetThreadList().FindThreadByIndexID(index_id, can_update);
757 ProcessSP process_sp =
790 EventSP event_sp =
event.GetSP();
791 EventData *event_data = event_sp ? event_sp->GetData() :
nullptr;
792 return event_data && (event_data->
GetFlavor() ==
799 ProcessSP process_sp(
GetSP());
817 sb_error.SetErrorStringWithFormat(
818 "no buffer provided to read %zu bytes into", dst_len);
822 size_t bytes_read = 0;
823 ProcessSP process_sp(
GetSP());
828 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
829 std::lock_guard<std::recursive_mutex> guard(
830 process_sp->GetTarget().GetAPIMutex());
831 bytes_read = process_sp->ReadMemory(addr, dst, dst_len, sb_error.
ref());
846 size_t bytes_read = 0;
847 ProcessSP process_sp(
GetSP());
850 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
851 std::lock_guard<std::recursive_mutex> guard(
852 process_sp->GetTarget().GetAPIMutex());
853 bytes_read = process_sp->ReadCStringFromMemory(addr, (
char *)buf, size,
869 ProcessSP process_sp(
GetSP());
872 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
873 std::lock_guard<std::recursive_mutex> guard(
874 process_sp->GetTarget().GetAPIMutex());
875 value = process_sp->ReadUnsignedIntegerFromMemory(addr, byte_size, 0,
891 ProcessSP process_sp(
GetSP());
894 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
895 std::lock_guard<std::recursive_mutex> guard(
896 process_sp->GetTarget().GetAPIMutex());
897 ptr = process_sp->ReadPointerFromMemory(addr, sb_error.
ref());
911 size_t bytes_written = 0;
913 ProcessSP process_sp(
GetSP());
917 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
918 std::lock_guard<std::recursive_mutex> guard(
919 process_sp->GetTarget().GetAPIMutex());
921 process_sp->WriteMemory(addr, src, src_len, sb_error.
ref());
927 return bytes_written;
935 ProcessSP process_sp(
GetSP());
939 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
940 const char *exe_name =
nullptr;
944 strm.
Printf(
"SBProcess: pid = %" PRIu64
", state = %s, threads = %d%s%s",
947 exe_name ? exe_name :
"");
957 ProcessSP process_sp(
GetSP());
961 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
967 platform_sp->FetchExtendedCrashInformation(*process_sp.get());
973 data.
m_impl_up->SetObjectSP(fetched_data);
982 ProcessSP process_sp(
GetSP());
984 std::lock_guard<std::recursive_mutex> guard(
985 process_sp->GetTarget().GetAPIMutex());
986 std::optional<uint32_t> actual_num = process_sp->GetWatchpointSlotCount();
990 sb_error.
SetErrorString(
"Unable to determine number of watchpoints");
1010 ProcessSP process_sp(
GetSP());
1013 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1014 std::lock_guard<std::recursive_mutex> guard(
1015 process_sp->GetTarget().GetAPIMutex());
1016 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1017 return platform_sp->LoadImage(process_sp.get(), *sb_local_image_spec,
1018 *sb_remote_image_spec, sb_error.
ref());
1034 ProcessSP process_sp(
GetSP());
1037 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1038 std::lock_guard<std::recursive_mutex> guard(
1039 process_sp->GetTarget().GetAPIMutex());
1040 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1041 size_t num_paths = paths.
GetSize();
1042 std::vector<std::string> paths_vec;
1043 paths_vec.reserve(num_paths);
1044 for (
size_t i = 0; i < num_paths; i++)
1048 uint32_t token = platform_sp->LoadImageUsingPaths(
1049 process_sp.get(), *image_spec, paths_vec,
error.ref(), &loaded_spec);
1051 loaded_path = loaded_spec;
1054 error.SetErrorString(
"process is running");
1057 error.SetErrorString(
"process is invalid");
1067 ProcessSP process_sp(
GetSP());
1070 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1071 std::lock_guard<std::recursive_mutex> guard(
1072 process_sp->GetTarget().GetAPIMutex());
1073 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1075 platform_sp->UnloadImage(process_sp.get(), image_token));
1088 ProcessSP process_sp(
GetSP());
1091 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1092 std::lock_guard<std::recursive_mutex> guard(
1093 process_sp->GetTarget().GetAPIMutex());
1094 sb_error.
SetError(process_sp->SendEventData(event_data));
1106 ProcessSP process_sp(
GetSP());
1107 if (process_sp && process_sp->GetSystemRuntime()) {
1117 ProcessSP process_sp(
GetSP());
1118 if (process_sp && process_sp->GetSystemRuntime()) {
1120 const std::vector<ConstString> &names =
1122 if (idx < names.size()) {
1123 return names[idx].AsCString();
1132 ProcessSP process_sp(
GetSP());
1144 ProcessSP process_sp(
GetSP());
1148 std::lock_guard<std::recursive_mutex> guard(
1149 process_sp->GetTarget().GetAPIMutex());
1151 InstrumentationRuntimeSP runtime_sp =
1152 process_sp->GetInstrumentationRuntime(type);
1154 if (!runtime_sp.get())
1157 return runtime_sp->IsActive();
1171 ProcessSP process_sp(
GetSP());
1173 error.SetErrorString(
"SBProcess is invalid");
1177 std::lock_guard<std::recursive_mutex> guard(
1178 process_sp->GetTarget().GetAPIMutex());
1181 error.SetErrorString(
"the process is not stopped");
1198 ProcessSP process_sp(
GetSP());
1201 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1202 std::lock_guard<std::recursive_mutex> guard(
1203 process_sp->GetTarget().GetAPIMutex());
1206 process_sp->GetMemoryRegionInfo(load_addr, sb_region_info.
ref());
1221 ProcessSP process_sp(
GetSP());
1223 if (process_sp && stop_locker.
TryLock(&process_sp->GetRunLock())) {
1224 std::lock_guard<std::recursive_mutex> guard(
1225 process_sp->GetTarget().GetAPIMutex());
1227 process_sp->GetMemoryRegions(sb_region_list.
ref());
1230 return sb_region_list;
1237 ProcessSP process_sp(
GetSP());
1239 if (process_sp && process_sp->GetProcessInfo(proc_info)) {
1242 return sb_proc_info;
1250 ProcessSP process_sp(
GetSP());
1253 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1254 std::lock_guard<std::recursive_mutex> guard(
1255 process_sp->GetTarget().GetAPIMutex());
1256 addr = process_sp->AllocateMemory(size, permissions, sb_error.
ref());
1270 ProcessSP process_sp(
GetSP());
1273 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1274 std::lock_guard<std::recursive_mutex> guard(
1275 process_sp->GetTarget().GetAPIMutex());
1289 ProcessSP process_sp(
GetSP());
1290 return (process_sp) ? process_sp->GetImplementation() :
nullptr;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
void AppendMessage(const char *message)
static const char * StateAsCString(lldb::StateType state)
void SetErrorString(const char *err_str)
void SetError(uint32_t err, lldb::ErrorType type)
lldb_private::Status & ref()
void reset(lldb::EventSP &event_sp)
lldb_private::Event * get() const
lldb::EventSP & GetSP() const
uint32_t GetPath(char *dst_path, size_t dst_len) const
lldb_private::MemoryRegionInfos & ref()
lldb_private::MemoryRegionInfo & ref()
void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref)
const lldb::SBProcess & operator=(const lldb::SBProcess &rhs)
static size_t GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event)
lldb::SBError SendEventData(const char *data)
lldb::SBBroadcaster GetBroadcaster() const
lldb::SBThread GetThreadAtIndex(size_t index)
static const char * GetBroadcasterClassName()
void AppendEventStateReport(const lldb::SBEvent &event, lldb::SBCommandReturnObject &result)
uint32_t GetNumExtendedBacktraceTypes()
Return the number of different thread-origin extended backtraces this process can support.
size_t PutSTDIN(const char *src, size_t src_len)
lldb::SBQueue GetQueueAtIndex(size_t index)
void ReportEventState(const lldb::SBEvent &event, FILE *out) const
const char * GetExitDescription()
lldb::SBThread GetThreadByIndexID(uint32_t index_id)
static const char * GetBroadcasterClass()
static lldb::SBStructuredData GetStructuredDataFromEvent(const lldb::SBEvent &event)
lldb::ProcessSP GetSP() const
lldb::pid_t GetProcessID()
Gets the process ID.
lldb::addr_t AllocateMemory(size_t size, uint32_t permissions, lldb::SBError &error)
Allocate memory within the process.
static bool EventIsStructuredDataEvent(const lldb::SBEvent &event)
const char * GetShortPluginName()
lldb::SBError UnloadImage(uint32_t image_token)
lldb::SBProcessInfo GetProcessInfo()
Return information about the process.
uint32_t GetUniqueID()
Gets the unique ID associated with this process object.
bool GetDescription(lldb::SBStream &description)
size_t GetAsyncProfileData(char *dst, size_t dst_len) const
lldb::StateType GetState()
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context)
lldb::ScriptedObject GetScriptedImplementation()
lldb::ByteOrder GetByteOrder() const
size_t ReadCStringFromMemory(addr_t addr, void *char_buf, size_t size, lldb::SBError &error)
lldb::addr_t ReadPointerFromMemory(addr_t addr, lldb::SBError &error)
lldb::SBError DeallocateMemory(lldb::addr_t ptr)
Deallocate memory in the process.
static lldb::StateType GetStateFromEvent(const lldb::SBEvent &event)
lldb::SBThread GetSelectedThread() const
bool SetSelectedThreadByIndexID(uint32_t index_id)
size_t ReadMemory(addr_t addr, void *buf, size_t size, lldb::SBError &error)
const char * GetExtendedBacktraceTypeAtIndex(uint32_t idx)
Return the name of one of the thread-origin extended backtrace methods.
lldb::SBThread GetThreadByID(lldb::tid_t sb_thread_id)
bool RemoteAttachToProcessWithID(lldb::pid_t pid, lldb::SBError &error)
Remote connection related functions.
lldb::SBTarget GetTarget() const
const char * GetPluginName()
bool RemoteLaunch(char const **argv, char const **envp, const char *stdin_path, const char *stdout_path, const char *stderr_path, const char *working_directory, uint32_t launch_flags, bool stop_at_entry, lldb::SBError &error)
size_t GetSTDOUT(char *dst, size_t dst_len) const
lldb::SBEvent GetStopEventForStopID(uint32_t stop_id)
Gets the stop event corresponding to stop ID.
lldb::SBError Signal(int signal)
static bool GetInterruptedFromEvent(const lldb::SBEvent &event)
lldb::ProcessWP m_opaque_wp
uint32_t GetNumSupportedHardwareWatchpoints(lldb::SBError &error) const
uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec, SBStringList &paths, lldb::SBFileSpec &loaded_path, lldb::SBError &error)
Load a shared library into this process, starting with a library name and a list of paths,...
uint32_t LoadImage(lldb::SBFileSpec &remote_image_spec, lldb::SBError &error)
Load a shared library into this process.
static const char * GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event, size_t idx)
lldb::SBUnixSignals GetUnixSignals()
lldb::SBThreadCollection GetHistoryThreads(addr_t addr)
bool IsInstrumentationRuntimePresent(InstrumentationRuntimeType type)
bool SetSelectedThread(const lldb::SBThread &thread)
bool SetSelectedThreadByID(lldb::tid_t tid)
void SendAsyncInterrupt()
static bool GetRestartedFromEvent(const lldb::SBEvent &event)
static bool EventIsProcessEvent(const lldb::SBEvent &event)
lldb::SBError GetMemoryRegionInfo(lldb::addr_t load_addr, lldb::SBMemoryRegionInfo ®ion_info)
Query the address load_addr and store the details of the memory region that contains it in the suppli...
void SetSP(const lldb::ProcessSP &process_sp)
size_t WriteMemory(addr_t addr, const void *buf, size_t size, lldb::SBError &error)
lldb::SBError SaveCore(const char *file_name, const char *flavor, SaveCoreStyle core_style)
Save the state of the process in a core file.
lldb::SBMemoryRegionInfoList GetMemoryRegions()
Return the list of memory regions within the process.
uint32_t GetAddressByteSize() const
SBStructuredData GetExtendedCrashInformation()
uint32_t GetStopID(bool include_expression_stops=false)
uint64_t ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size, lldb::SBError &error)
void ForceScriptedState(StateType new_state)
If the process is a scripted process, changes its state to the new state.
static lldb::SBProcess GetProcessFromEvent(const lldb::SBEvent &event)
size_t GetSTDERR(char *dst, size_t dst_len) const
void SetQueue(const lldb::QueueSP &queue_sp)
lldb_private::Stream & ref()
const char * GetStringAtIndex(size_t idx)
StructuredDataImplUP m_impl_up
void SetSP(const lldb::TargetSP &target_sp)
lldb::SBFileSpec GetExecutable()
lldb::tid_t GetThreadID() const
void SetThread(const lldb::ThreadSP &lldb_object_sp)
void AppendArguments(const Args &rhs)
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
const char * GetCString() const
Get the string value as a C string.
static llvm::StringRef GetFlavorString()
static lldb::ProcessSP GetProcessFromEvent(const Event *event_ptr)
virtual llvm::StringRef GetFlavor() const =0
const ConstString & GetFilename() const
Filename string const get accessor.
A class that describes an executable image and its associated object and symbol files.
const FileSpec & GetPlatformFileSpec() const
Get accessor for the module platform file specification.
const FileSpec & GetFileSpec() const
Get const accessor for the module file specification.
static Status SaveCore(const lldb::ProcessSP &process_sp, const FileSpec &outfile, lldb::SaveCoreStyle &core_style, llvm::StringRef plugin_name)
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
void SetProcessID(lldb::pid_t pid)
Environment & GetEnvironment()
bool TryLock(ProcessRunLock *lock)
static bool GetRestartedFromEvent(const Event *event_ptr)
static lldb::ProcessSP GetProcessFromEvent(const Event *event_ptr)
size_t GetNumRestartedReasons()
static bool GetInterruptedFromEvent(const Event *event_ptr)
const char * GetRestartedReasonAtIndex(size_t idx)
static lldb::StateType GetStateFromEvent(const Event *event_ptr)
static const Process::ProcessEventData * GetEventDataFromEvent(const Event *event_ptr)
static ConstString & GetStaticBroadcasterClass()
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
std::shared_ptr< Object > ObjectSP
A plug-in interface definition class for system runtimes.
virtual const std::vector< ConstString > & GetExtendedBacktraceTypes()
Return a list of thread origin extended backtraces that may be available.
#define LLDB_INVALID_IMAGE_TOKEN
#define LLDB_INVALID_ADDRESS
#define LLDB_INVALID_PROCESS_ID
A class that represents a running process on the host machine.
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
StateType
Process and Thread States.
@ eStateConnected
Process is connected to remote debug services, but not launched or attached to anything yet.
@ eStateStopped
Process or thread is stopped and can be examined.
InstrumentationRuntimeType
ByteOrder
Byte ordering definitions.