96const char *SBProcess::GetShortPluginName() {
118 return this->
operator bool();
120SBProcess::operator
bool()
const {
124 return ((
bool)process_sp && process_sp->IsValid());
128 const char *stdin_path,
const char *stdout_path,
129 const char *stderr_path,
130 const char *working_directory,
131 uint32_t launch_flags,
bool stop_at_entry,
134 working_directory, launch_flags, stop_at_entry,
error);
138 std::lock_guard<std::recursive_mutex> guard(
139 process_sp->GetTarget().GetAPIMutex());
142 launch_flags |= eLaunchFlagStopAtEntry;
145 FileSpec(working_directory), launch_flags);
146 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
153 error.SetError(process_sp->Launch(launch_info));
156 "must be in eStateConnected to call RemoteLaunch");
162 return error.Success();
171 std::lock_guard<std::recursive_mutex> guard(
172 process_sp->GetTarget().GetAPIMutex());
176 error.SetError(process_sp->Attach(attach_info));
179 "must be in eStateConnected to call RemoteAttachToProcessWithID");
185 return error.Success();
191 uint32_t num_threads = 0;
196 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
197 std::lock_guard<std::recursive_mutex> guard(
198 process_sp->GetTarget().GetAPIMutex());
199 num_threads = process_sp->GetThreadList().GetSize();
213 std::lock_guard<std::recursive_mutex> guard(
214 process_sp->GetTarget().GetAPIMutex());
215 thread_sp = process_sp->GetThreadList().GetSelectedThread();
230 std::lock_guard<std::recursive_mutex> guard(
231 process_sp->GetTarget().GetAPIMutex());
232 thread_sp = process_sp->CreateOSPluginThread(tid, context);
246 target_sp = process_sp->GetTarget().shared_from_this();
247 sb_target.
SetSP(target_sp);
260 ret_val = process_sp->PutSTDIN(src, src_len,
error);
269 size_t bytes_read = 0;
273 bytes_read = process_sp->GetSTDOUT(dst, dst_len,
error);
282 size_t bytes_read = 0;
286 bytes_read = process_sp->GetSTDERR(dst, dst_len,
error);
295 size_t bytes_read = 0;
299 bytes_read = process_sp->GetAsyncProfileData(dst, dst_len,
error);
313 FileSP outfile = std::make_shared<NativeFile>(out,
false);
321 if (!out || !out->IsValid())
328 stream.
Printf(
"Process %" PRIu64
" %s\n", process_sp->GetID(),
341 ::snprintf(message,
sizeof(message),
"Process %" PRIu64
" %s\n",
353 std::lock_guard<std::recursive_mutex> guard(
354 process_sp->GetTarget().GetAPIMutex());
355 return process_sp->GetThreadList().SetSelectedThreadByID(
356 thread.GetThreadID());
364 bool ret_val =
false;
367 std::lock_guard<std::recursive_mutex> guard(
368 process_sp->GetTarget().GetAPIMutex());
369 ret_val = process_sp->GetThreadList().SetSelectedThreadByID(tid);
378 bool ret_val =
false;
381 std::lock_guard<std::recursive_mutex> guard(
382 process_sp->GetTarget().GetAPIMutex());
383 ret_val = process_sp->GetThreadList().SetSelectedThreadByIndexID(index_id);
397 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
398 std::lock_guard<std::recursive_mutex> guard(
399 process_sp->GetTarget().GetAPIMutex());
400 thread_sp = process_sp->GetThreadList().GetThreadAtIndex(index,
false);
411 uint32_t num_queues = 0;
415 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
416 std::lock_guard<std::recursive_mutex> guard(
417 process_sp->GetTarget().GetAPIMutex());
418 num_queues = process_sp->GetQueueList().GetSize();
433 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
434 std::lock_guard<std::recursive_mutex> guard(
435 process_sp->GetTarget().GetAPIMutex());
436 queue_sp = process_sp->GetQueueList().GetQueueAtIndex(index);
449 std::lock_guard<std::recursive_mutex> guard(
450 process_sp->GetTarget().GetAPIMutex());
451 if (include_expression_stops)
452 return process_sp->GetStopID();
454 return process_sp->GetLastNaturalStopID();
466 std::lock_guard<std::recursive_mutex> guard(
467 process_sp->GetTarget().GetAPIMutex());
468 event_sp = process_sp->GetStopEventForStopID(stop_id);
469 sb_event.
reset(event_sp);
479 std::lock_guard<std::recursive_mutex> guard(
480 process_sp->GetTarget().GetAPIMutex());
481 process_sp->ForceScriptedState(new_state);
491 std::lock_guard<std::recursive_mutex> guard(
492 process_sp->GetTarget().GetAPIMutex());
493 ret_val = process_sp->GetState();
505 std::lock_guard<std::recursive_mutex> guard(
506 process_sp->GetTarget().GetAPIMutex());
507 exit_status = process_sp->GetExitStatus();
520 std::lock_guard<std::recursive_mutex> guard(
521 process_sp->GetTarget().GetAPIMutex());
531 ret_val = process_sp->GetID();
539 uint32_t ret_val = 0;
542 ret_val = process_sp->GetUniqueID();
552 byteOrder = process_sp->GetTarget().GetArchitecture().GetByteOrder();
563 size = process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
575 std::lock_guard<std::recursive_mutex> guard(
576 process_sp->GetTarget().GetAPIMutex());
578 if (process_sp->GetTarget().GetDebugger().GetAsyncExecution())
579 sb_error.
ref() = process_sp->Resume();
581 sb_error.
ref() = process_sp->ResumeSynchronous(
nullptr);
591 !process_sp->SupportsReverseDirection())
593 "{0} does not support reverse execution of processes",
595 process_sp->SetBaseDirection(direction);
606 std::lock_guard<std::recursive_mutex> guard(
607 process_sp->GetTarget().GetAPIMutex());
608 sb_error.
SetError(process_sp->Destroy(
false));
621 std::lock_guard<std::recursive_mutex> guard(
622 process_sp->GetTarget().GetAPIMutex());
623 sb_error.
SetError(process_sp->Halt());
636 std::lock_guard<std::recursive_mutex> guard(
637 process_sp->GetTarget().GetAPIMutex());
638 sb_error.
SetError(process_sp->Destroy(
true));
649 bool keep_stopped =
false;
650 return Detach(keep_stopped);
659 std::lock_guard<std::recursive_mutex> guard(
660 process_sp->GetTarget().GetAPIMutex());
661 sb_error.
SetError(process_sp->Detach(keep_stopped));
674 std::lock_guard<std::recursive_mutex> guard(
675 process_sp->GetTarget().GetAPIMutex());
676 sb_error.
SetError(process_sp->Signal(signo));
686 if (
auto process_sp =
GetSP())
697 process_sp->SendAsyncInterrupt();
709 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
710 std::lock_guard<std::recursive_mutex> guard(
711 process_sp->GetTarget().GetAPIMutex());
712 thread_sp = process_sp->GetThreadList().FindThreadByID(tid, can_update);
727 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
728 std::lock_guard<std::recursive_mutex> guard(
729 process_sp->GetTarget().GetAPIMutex());
731 process_sp->GetThreadList().FindThreadByIndexID(index_id, can_update);
806 EventSP event_sp =
event.GetSP();
807 EventData *event_data = event_sp ? event_sp->GetData() :
nullptr;
808 return event_data && (event_data->
GetFlavor() ==
830 uint32_t alignment, uint32_t max_matches,
SBError &
error) {
841 if (!stop_locker.
TryLock(&process_sp->GetRunLock())) {
845 std::lock_guard<std::recursive_mutex> guard(
846 process_sp->GetTarget().GetAPIMutex());
847 matches.
m_opaque_up->ref() = process_sp->FindRangesInMemory(
848 reinterpret_cast<const uint8_t *
>(buf), size, ranges.
ref().
ref(),
849 alignment, max_matches,
error.ref());
866 if (!stop_locker.
TryLock(&process_sp->GetRunLock())) {
871 std::lock_guard<std::recursive_mutex> guard(
872 process_sp->GetTarget().GetAPIMutex());
873 return process_sp->FindInMemory(
reinterpret_cast<const uint8_t *
>(buf), size,
874 range.
ref(), alignment,
error.ref());
883 "no buffer provided to read %zu bytes into", dst_len);
887 size_t bytes_read = 0;
893 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
894 std::lock_guard<std::recursive_mutex> guard(
895 process_sp->GetTarget().GetAPIMutex());
896 bytes_read = process_sp->ReadMemory(addr, dst, dst_len, sb_error.
ref());
911 size_t bytes_read = 0;
915 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
916 std::lock_guard<std::recursive_mutex> guard(
917 process_sp->GetTarget().GetAPIMutex());
918 bytes_read = process_sp->ReadCStringFromMemory(addr, (
char *)buf, size,
937 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
938 std::lock_guard<std::recursive_mutex> guard(
939 process_sp->GetTarget().GetAPIMutex());
940 value = process_sp->ReadUnsignedIntegerFromMemory(addr, byte_size, 0,
959 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
960 std::lock_guard<std::recursive_mutex> guard(
961 process_sp->GetTarget().GetAPIMutex());
962 ptr = process_sp->ReadPointerFromMemory(addr, sb_error.
ref());
976 size_t bytes_written = 0;
982 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
983 std::lock_guard<std::recursive_mutex> guard(
984 process_sp->GetTarget().GetAPIMutex());
986 process_sp->WriteMemory(addr, src, src_len, sb_error.
ref());
992 return bytes_written;
1000 process_sp->GetStatus(status.
ref());
1012 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
1013 const char *exe_name =
nullptr;
1017 strm.
Printf(
"SBProcess: pid = %" PRIu64
", state = %s, threads = %d%s%s",
1020 exe_name ? exe_name :
"");
1034 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1039 auto expected_data =
1040 platform_sp->FetchExtendedCrashInformation(*process_sp.get());
1046 data.
m_impl_up->SetObjectSP(fetched_data);
1057 std::lock_guard<std::recursive_mutex> guard(
1058 process_sp->GetTarget().GetAPIMutex());
1059 std::optional<uint32_t> actual_num = process_sp->GetWatchpointSlotCount();
1087 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1088 std::lock_guard<std::recursive_mutex> guard(
1089 process_sp->GetTarget().GetAPIMutex());
1090 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1091 return platform_sp->LoadImage(process_sp.get(), *sb_local_image_spec,
1092 *sb_remote_image_spec, sb_error.
ref());
1111 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1112 std::lock_guard<std::recursive_mutex> guard(
1113 process_sp->GetTarget().GetAPIMutex());
1114 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1115 size_t num_paths = paths.
GetSize();
1116 std::vector<std::string> paths_vec;
1117 paths_vec.reserve(num_paths);
1118 for (
size_t i = 0; i < num_paths; i++)
1122 uint32_t token = platform_sp->LoadImageUsingPaths(
1123 process_sp.get(), *image_spec, paths_vec,
error.ref(), &loaded_spec);
1125 loaded_path = loaded_spec;
1144 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1145 std::lock_guard<std::recursive_mutex> guard(
1146 process_sp->GetTarget().GetAPIMutex());
1147 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1149 platform_sp->UnloadImage(process_sp.get(), image_token));
1165 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1166 std::lock_guard<std::recursive_mutex> guard(
1167 process_sp->GetTarget().GetAPIMutex());
1168 sb_error.
SetError(process_sp->SendEventData(event_data));
1181 if (process_sp && process_sp->GetSystemRuntime()) {
1192 if (process_sp && process_sp->GetSystemRuntime()) {
1194 const std::vector<ConstString> &names =
1196 if (idx < names.size()) {
1197 return names[idx].AsCString();
1222 std::lock_guard<std::recursive_mutex> guard(
1223 process_sp->GetTarget().GetAPIMutex());
1226 process_sp->GetInstrumentationRuntime(type);
1228 if (!runtime_sp.get())
1231 return runtime_sp->IsActive();
1271 "Save Core Options configured for a different process.");
1275 std::lock_guard<std::recursive_mutex> guard(
1276 process_sp->GetTarget().GetAPIMutex());
1297 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1298 std::lock_guard<std::recursive_mutex> guard(
1299 process_sp->GetTarget().GetAPIMutex());
1302 process_sp->GetMemoryRegionInfo(load_addr, sb_region_info.
ref());
1319 if (process_sp && stop_locker.
TryLock(&process_sp->GetRunLock())) {
1320 std::lock_guard<std::recursive_mutex> guard(
1321 process_sp->GetTarget().GetAPIMutex());
1323 process_sp->GetMemoryRegions(sb_region_list.
ref());
1326 return sb_region_list;
1335 if (process_sp && process_sp->GetProcessInfo(proc_info)) {
1338 return sb_proc_info;
1347 core_file = process_sp->GetCoreFile();
1360 return process_sp->GetHighmemCodeAddressMask();
1362 return process_sp->GetCodeAddressMask();
1365 return process_sp->GetHighmemDataAddressMask();
1367 return process_sp->GetDataAddressMask();
1370 return process_sp->GetHighmemDataAddressMask();
1372 return process_sp->GetDataAddressMask();
1386 process_sp->SetCodeAddressMask(mask);
1387 process_sp->SetHighmemCodeAddressMask(mask);
1389 process_sp->SetHighmemCodeAddressMask(mask);
1391 process_sp->SetCodeAddressMask(mask);
1396 process_sp->SetDataAddressMask(mask);
1397 process_sp->SetHighmemDataAddressMask(mask);
1399 process_sp->SetHighmemDataAddressMask(mask);
1401 process_sp->SetDataAddressMask(mask);
1406 process_sp->SetCodeAddressMask(mask);
1407 process_sp->SetDataAddressMask(mask);
1408 process_sp->SetHighmemCodeAddressMask(mask);
1409 process_sp->SetHighmemDataAddressMask(mask);
1411 process_sp->SetHighmemCodeAddressMask(mask);
1412 process_sp->SetHighmemDataAddressMask(mask);
1414 process_sp->SetCodeAddressMask(mask);
1415 process_sp->SetDataAddressMask(mask);
1435 return process_sp->FixAnyAddress(addr);
1437 return process_sp->FixDataAddress(addr);
1439 return process_sp->FixCodeAddress(addr);
1452 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1453 std::lock_guard<std::recursive_mutex> guard(
1454 process_sp->GetTarget().GetAPIMutex());
1455 addr = process_sp->AllocateMemory(size, permissions, sb_error.
ref());
1472 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1473 std::lock_guard<std::recursive_mutex> guard(
1474 process_sp->GetTarget().GetAPIMutex());
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
std::unique_ptr< lldb_private::AddressRangeListImpl > m_opaque_up
lldb_private::AddressRangeListImpl & ref() const
lldb_private::AddressRange & ref() const
void AppendMessage(const char *message)
static const char * StateAsCString(lldb::StateType state)
Convert a state type to a string.
void SetError(uint32_t err, lldb::ErrorType type)
lldb_private::Status & ref()
lldb_private::Event * get() const
void reset(lldb::EventSP &event_sp)
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
lldb::SBFileSpec GetCoreFile()
Get the file specification for the core file that is currently being used for the process.
const char * GetExitDescription()
lldb::SBThread GetThreadByIndexID(uint32_t index_id)
static const char * GetBroadcasterClass()
static lldb::SBStructuredData GetStructuredDataFromEvent(const lldb::SBEvent &event)
friend class SBSaveCoreOptions
lldb::ProcessSP GetSP() const
lldb::addr_t FindInMemory(const void *buf, uint64_t size, const SBAddressRange &range, uint32_t alignment, SBError &error)
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)
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::addr_t FixAddress(lldb::addr_t addr, lldb::AddressMaskType type=lldb::eAddressMaskTypeAny)
Clear the non-address bits of an addr value and return a virtual address in memory.
lldb::StateType GetState()
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context)
lldb::SBScriptObject GetScriptedImplementation()
void GetStatus(SBStream &status)
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
lldb::SBAddressRangeList FindRangesInMemory(const void *buf, uint64_t size, const SBAddressRangeList &ranges, uint32_t alignment, uint32_t max_matches, SBError &error)
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)
void SetAddressMask(lldb::AddressMaskType type, lldb::addr_t mask, lldb::AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Set the current address mask that can be applied to addresses before reading from memory.
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::addr_t GetAddressMask(lldb::AddressMaskType type, lldb::AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Get the current address mask that will be applied to addresses before reading from memory.
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.
void SetAddressableBits(AddressMaskType type, uint32_t num_bits, AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Set the number of bits used for addressing in 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.
lldb::SBError ContinueInDirection(lldb::RunDirection direction)
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)
void SetStyle(lldb::SaveCoreStyle style)
Set the Core dump style.
void SetOutputFile(SBFileSpec output_file)
Set the output file path.
lldb_private::SaveCoreOptions & ref() const
SBError SetProcess(lldb::SBProcess process)
Set the process to save, or unset if supplied with a default constructed process.
SBProcess GetProcess()
Get the process to save, if the process is not set an invalid SBProcess will be returned.
SBError SetPluginName(const char *plugin)
Set the plugin name.
lldb_private::Stream & ref()
const char * GetStringAtIndex(size_t idx)
StructuredDataImplUP m_impl_up
void SetSP(const lldb::TargetSP &target_sp)
lldb::SBFileSpec GetExecutable()
void SetThread(const lldb::ThreadSP &lldb_object_sp)
static lldb::addr_t AddressableBitToMask(uint32_t addressable_bits)
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(lldb_private::SaveCoreOptions &core_options)
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)
ProcessRunLock::ProcessRunLocker StopLocker
static llvm::StringRef GetStaticBroadcasterClass()
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
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_ADDRESS_MASK
Address Mask Bits not used for addressing are set to 1 in the mask; all mask bits set is an invalid v...
#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.
std::shared_ptr< lldb_private::Queue > QueueSP
class LLDB_API SBFileSpec
class LLDB_API SBStructuredData
RunDirection
Execution directions.
std::shared_ptr< lldb_private::Thread > ThreadSP
AddressMaskRange
Used in the SBProcess AddressMask/FixAddress methods.
class LLDB_API SBScriptObject
std::shared_ptr< lldb_private::Platform > PlatformSP
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.
std::shared_ptr< lldb_private::Process > ProcessSP
class LLDB_API SBThreadCollection
InstrumentationRuntimeType
std::shared_ptr< lldb_private::Event > EventSP
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::Target > TargetSP
AddressMaskType
Used in the SBProcess AddressMask/FixAddress methods.
std::shared_ptr< lldb_private::File > FileSP
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP