99const char *SBProcess::GetShortPluginName() {
121 return this->
operator bool();
123SBProcess::operator
bool()
const {
127 return ((
bool)process_sp && process_sp->IsValid());
131 const char *stdin_path,
const char *stdout_path,
132 const char *stderr_path,
133 const char *working_directory,
134 uint32_t launch_flags,
bool stop_at_entry,
137 working_directory, launch_flags, stop_at_entry,
error);
142 std::lock_guard<TargetAPIMutex> guard(api_lock);
145 launch_flags |= eLaunchFlagStopAtEntry;
148 FileSpec(working_directory), launch_flags);
149 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
156 error.SetError(process_sp->Launch(launch_info));
159 "must be in eStateConnected to call RemoteLaunch");
165 return error.Success();
175 std::lock_guard<TargetAPIMutex> guard(api_lock);
179 error.SetError(process_sp->Attach(attach_info));
182 "must be in eStateConnected to call RemoteAttachToProcessWithID");
188 return error.Success();
194 uint32_t num_threads = 0;
199 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
201 std::lock_guard<TargetAPIMutex> guard(api_lock);
202 num_threads = process_sp->GetThreadList().GetSize();
217 std::lock_guard<TargetAPIMutex> guard(api_lock);
218 thread_sp = process_sp->GetThreadList().GetSelectedThread();
234 std::lock_guard<TargetAPIMutex> guard(api_lock);
235 thread_sp = process_sp->CreateOSPluginThread(tid, context);
249 target_sp = process_sp->GetTarget().shared_from_this();
250 sb_target.
SetSP(target_sp);
263 ret_val = process_sp->PutSTDIN(src, src_len,
error);
272 size_t bytes_read = 0;
276 bytes_read = process_sp->GetSTDOUT(dst, dst_len,
error);
285 size_t bytes_read = 0;
289 bytes_read = process_sp->GetSTDERR(dst, dst_len,
error);
298 size_t bytes_read = 0;
302 bytes_read = process_sp->GetAsyncProfileData(dst, dst_len,
error);
325 if (!out || !out->IsValid())
332 stream.
Printf(
"Process %" PRIu64
" %s\n", process_sp->GetID(),
345 ::snprintf(message,
sizeof(message),
"Process %" PRIu64
" %s\n",
358 std::lock_guard<TargetAPIMutex> guard(api_lock);
359 return process_sp->GetThreadList().SetSelectedThreadByID(
360 thread.GetThreadID());
368 bool ret_val =
false;
372 std::lock_guard<TargetAPIMutex> guard(api_lock);
373 ret_val = process_sp->GetThreadList().SetSelectedThreadByID(tid);
382 bool ret_val =
false;
386 std::lock_guard<TargetAPIMutex> guard(api_lock);
387 ret_val = process_sp->GetThreadList().SetSelectedThreadByIndexID(index_id);
401 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
403 std::lock_guard<TargetAPIMutex> guard(api_lock);
404 thread_sp = process_sp->GetThreadList().GetThreadAtIndex(index,
false);
415 uint32_t num_queues = 0;
419 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
421 std::lock_guard<TargetAPIMutex> guard(api_lock);
422 num_queues = process_sp->GetQueueList().GetSize();
437 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
439 std::lock_guard<TargetAPIMutex> guard(api_lock);
440 queue_sp = process_sp->GetQueueList().GetQueueAtIndex(index);
454 std::lock_guard<TargetAPIMutex> guard(api_lock);
455 if (include_expression_stops)
456 return process_sp->GetStopID();
458 return process_sp->GetLastNaturalStopID();
471 std::lock_guard<TargetAPIMutex> guard(api_lock);
472 event_sp = process_sp->GetStopEventForStopID(stop_id);
473 sb_event.
reset(event_sp);
484 std::lock_guard<TargetAPIMutex> guard(api_lock);
485 process_sp->ForceScriptedState(new_state);
496 std::lock_guard<TargetAPIMutex> guard(api_lock);
497 ret_val = process_sp->GetState();
510 std::lock_guard<TargetAPIMutex> guard(api_lock);
511 exit_status = process_sp->GetExitStatus();
525 std::lock_guard<TargetAPIMutex> guard(api_lock);
535 ret_val = process_sp->GetID();
543 uint32_t ret_val = 0;
546 ret_val = process_sp->GetUniqueID();
556 byteOrder = process_sp->GetTarget().GetArchitecture().GetByteOrder();
567 size = process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
580 std::lock_guard<TargetAPIMutex> guard(api_lock);
582 if (process_sp->GetTarget().GetDebugger().GetAsyncExecution())
583 sb_error.
ref() = process_sp->Resume();
585 sb_error.
ref() = process_sp->ResumeSynchronous(
nullptr);
595 !process_sp->SupportsReverseDirection())
597 "{0} does not support reverse execution of processes",
599 process_sp->SetBaseDirection(direction);
611 std::lock_guard<TargetAPIMutex> guard(api_lock);
612 sb_error.
SetError(process_sp->Destroy(
false));
626 std::lock_guard<TargetAPIMutex> guard(api_lock);
627 sb_error.
SetError(process_sp->Halt());
641 std::lock_guard<TargetAPIMutex> guard(api_lock);
642 sb_error.
SetError(process_sp->Destroy(
true));
653 bool keep_stopped =
false;
654 return Detach(keep_stopped);
664 std::lock_guard<TargetAPIMutex> guard(api_lock);
665 sb_error.
SetError(process_sp->Detach(keep_stopped));
679 std::lock_guard<TargetAPIMutex> guard(api_lock);
680 sb_error.
SetError(process_sp->Signal(signo));
690 if (
auto process_sp =
GetSP())
701 process_sp->SendAsyncInterrupt();
713 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
715 std::lock_guard<TargetAPIMutex> guard(api_lock);
716 thread_sp = process_sp->GetThreadList().FindThreadByID(tid, can_update);
731 const bool can_update = stop_locker.
TryLock(&process_sp->GetRunLock());
733 std::lock_guard<TargetAPIMutex> guard(api_lock);
735 process_sp->GetThreadList().FindThreadByIndexID(index_id, can_update);
810 EventSP event_sp =
event.GetSP();
811 EventData *event_data = event_sp ? event_sp->GetData() :
nullptr;
812 return event_data && (event_data->
GetFlavor() ==
834 uint32_t alignment, uint32_t max_matches,
SBError &
error) {
845 if (!stop_locker.
TryLock(&process_sp->GetRunLock())) {
850 std::lock_guard<TargetAPIMutex> guard(api_lock);
851 matches.
m_opaque_up->ref() = process_sp->FindRangesInMemory(
852 reinterpret_cast<const uint8_t *
>(buf), size, ranges.
ref().
ref(),
853 alignment, max_matches,
error.ref());
870 if (!stop_locker.
TryLock(&process_sp->GetRunLock())) {
876 std::lock_guard<TargetAPIMutex> guard(api_lock);
877 return process_sp->FindInMemory(
reinterpret_cast<const uint8_t *
>(buf), size,
878 range.
ref(), alignment,
error.ref());
887 "no buffer provided to read %zu bytes into", dst_len);
891 size_t bytes_read = 0;
896 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
898 std::lock_guard<TargetAPIMutex> guard(api_lock);
899 bytes_read = process_sp->ReadMemory(addr, dst, dst_len, sb_error.
ref());
911 size_t dst_len,
SBError &sb_error) {
916 "no buffer provided to read %zu bytes into", dst_len);
927 if (!stop_locker.
TryLock(&process_sp->GetRunLock())) {
933 std::lock_guard<TargetAPIMutex> guard(api_lock);
934 return process_sp->ReadMemory(process_addr.
ref(), dst, dst_len,
948 if (!name || !name[0]) {
954 std::lock_guard<TargetAPIMutex> guard(api_lock);
955 llvm::Expected<AddressSpaceInfo> info = process_sp->GetAddressSpaceInfo(name);
961 return info->space_id;
968 size_t bytes_read = 0;
972 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
974 std::lock_guard<TargetAPIMutex> guard(api_lock);
975 bytes_read = process_sp->ReadCStringFromMemory(addr, (
char *)buf, size,
994 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
996 std::lock_guard<TargetAPIMutex> guard(api_lock);
997 value = process_sp->ReadUnsignedIntegerFromMemory(addr, byte_size, 0,
1016 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1018 std::lock_guard<TargetAPIMutex> guard(api_lock);
1019 if (llvm::Expected<lldb::addr_t> ptr_or_err =
1020 process_sp->ReadPointerFromMemory(addr))
1037 size_t bytes_written = 0;
1043 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1045 std::lock_guard<TargetAPIMutex> guard(api_lock);
1047 process_sp->WriteMemory(addr, src, src_len, sb_error.
ref());
1053 return bytes_written;
1061 process_sp->GetStatus(status.
ref());
1073 Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
1074 const char *exe_name =
nullptr;
1079 strm.
Printf(
"SBProcess: pid = %" PRIu64
", state = %s, threads = %d%s%s",
1082 exe_name ? exe_name :
"");
1096 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1101 auto expected_data =
1102 platform_sp->FetchExtendedCrashInformation(*process_sp.get());
1104 if (!expected_data) {
1106 "FetchExtendedCrashInformation failed: {0}");
1111 data.
m_impl_up->SetObjectSP(fetched_data);
1123 std::lock_guard<TargetAPIMutex> guard(api_lock);
1124 std::optional<uint32_t> actual_num = process_sp->GetWatchpointSlotCount();
1152 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1154 std::lock_guard<TargetAPIMutex> guard(api_lock);
1155 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1156 return platform_sp->LoadImage(process_sp.get(), *sb_local_image_spec,
1157 *sb_remote_image_spec, sb_error.
ref());
1176 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1178 std::lock_guard<TargetAPIMutex> guard(api_lock);
1179 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1180 size_t num_paths = paths.
GetSize();
1181 std::vector<std::string> paths_vec;
1182 paths_vec.reserve(num_paths);
1183 for (
size_t i = 0; i < num_paths; i++)
1187 uint32_t token = platform_sp->LoadImageUsingPaths(
1188 process_sp.get(), *image_spec, paths_vec,
error.ref(), &loaded_spec);
1190 loaded_path = loaded_spec;
1209 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1211 std::lock_guard<TargetAPIMutex> guard(api_lock);
1212 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
1214 platform_sp->UnloadImage(process_sp.get(), image_token));
1230 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1232 std::lock_guard<TargetAPIMutex> guard(api_lock);
1233 sb_error.
SetError(process_sp->SendEventData(event_data));
1246 if (process_sp && process_sp->GetSystemRuntime()) {
1257 if (process_sp && process_sp->GetSystemRuntime()) {
1259 const std::vector<ConstString> &names =
1261 if (idx < names.size()) {
1262 return names[idx].AsCString(
nullptr);
1288 std::lock_guard<TargetAPIMutex> guard(api_lock);
1291 process_sp->GetInstrumentationRuntime(type);
1293 if (!runtime_sp.get())
1296 return runtime_sp->IsActive();
1336 "Save Core Options configured for a different process.");
1341 std::lock_guard<TargetAPIMutex> guard(api_lock);
1362 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1364 std::lock_guard<TargetAPIMutex> guard(api_lock);
1367 process_sp->GetMemoryRegionInfo(load_addr, sb_region_info.
ref());
1384 if (process_sp && stop_locker.
TryLock(&process_sp->GetRunLock())) {
1386 std::lock_guard<TargetAPIMutex> guard(api_lock);
1388 process_sp->GetMemoryRegions(sb_region_list.
ref());
1391 return sb_region_list;
1400 if (process_sp && process_sp->GetProcessInfo(proc_info)) {
1403 return sb_proc_info;
1412 core_file = process_sp->GetCoreFile();
1423 return process_sp->IsLiveDebugSession();
1434 return process_sp->GetHighmemCodeAddressMask();
1436 return process_sp->GetCodeAddressMask();
1439 return process_sp->GetHighmemDataAddressMask();
1441 return process_sp->GetDataAddressMask();
1444 return process_sp->GetHighmemDataAddressMask();
1446 return process_sp->GetDataAddressMask();
1460 process_sp->SetCodeAddressMask(mask);
1461 process_sp->SetHighmemCodeAddressMask(mask);
1463 process_sp->SetHighmemCodeAddressMask(mask);
1465 process_sp->SetCodeAddressMask(mask);
1470 process_sp->SetDataAddressMask(mask);
1471 process_sp->SetHighmemDataAddressMask(mask);
1473 process_sp->SetHighmemDataAddressMask(mask);
1475 process_sp->SetDataAddressMask(mask);
1480 process_sp->SetCodeAddressMask(mask);
1481 process_sp->SetDataAddressMask(mask);
1482 process_sp->SetHighmemCodeAddressMask(mask);
1483 process_sp->SetHighmemDataAddressMask(mask);
1485 process_sp->SetHighmemCodeAddressMask(mask);
1486 process_sp->SetHighmemDataAddressMask(mask);
1488 process_sp->SetCodeAddressMask(mask);
1489 process_sp->SetDataAddressMask(mask);
1509 return process_sp->FixAnyAddress(addr);
1511 return process_sp->FixDataAddress(addr);
1513 return process_sp->FixCodeAddress(addr);
1526 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1528 std::lock_guard<TargetAPIMutex> guard(api_lock);
1529 addr = process_sp->AllocateMemory(size, permissions, sb_error.
ref());
1546 if (stop_locker.
TryLock(&process_sp->GetRunLock())) {
1548 std::lock_guard<TargetAPIMutex> guard(api_lock);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
#define LLDB_LOG_ERROR(log, error,...)
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()
A memory address, optionally in a non-default address space.
lldb_private::ProcessAddress & 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.
bool IsLiveDebugSession() const
Check whether this process is a live debug session, as opposed to a post-mortem session such as a cor...
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::addr_space_t GetAddressSpaceID(const char *name, lldb::SBError &error)
Resolve an address space name to its id, or LLDB_INVALID_ADDRESS_SPACE_ID.
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.
SBError SetPluginName(const char *plugin)
Set the plugin name.
SBProcess GetProcess() const
Get the process to save, if the process is not set an invalid SBProcess will be returned.
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 * GetCString() const
Get the string value as a C string.
const char * AsCString(const char *value_if_empty) 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
llvm::StringRef 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)
Try to acquire the read 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)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
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.
A Lockable handle over a Target's API mutex, returned by Target::GetAPIMutex() and backing the public...
#define LLDB_INVALID_ADDRESS_SPACE_ID
#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.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
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