LLDB mainline
ScriptedProcess.cpp
Go to the documentation of this file.
1//===-- ScriptedProcess.cpp -----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "ScriptedProcess.h"
10
11#include "lldb/Core/Debugger.h"
12#include "lldb/Core/Module.h"
14
22#include "lldb/Target/Queue.h"
26#include "lldb/Utility/State.h"
27
29
30using namespace lldb;
31using namespace lldb_private;
32
34
36 return "Scripted Process plug-in.";
37}
38
42
44 llvm::ArrayRef<lldb::ScriptLanguage> supported_languages =
45 llvm::ArrayRef(g_supported_script_languages);
46
47 return llvm::is_contained(supported_languages, language);
48}
49
51 lldb::ListenerSP listener_sp,
52 const FileSpec *file,
53 bool can_connect) {
54 if (!target_sp ||
55 !IsScriptLanguageSupported(target_sp->GetDebugger().GetScriptLanguage()))
56 return nullptr;
57
58 ScriptedMetadata scripted_metadata(target_sp->GetProcessLaunchInfo());
59
61 auto process_sp = std::shared_ptr<ScriptedProcess>(
62 new ScriptedProcess(target_sp, listener_sp, scripted_metadata, error));
63
64 if (error.Fail() || !process_sp || !process_sp->m_interface_up) {
65 LLDB_LOGF(GetLog(LLDBLog::Process), "%s", error.AsCString());
66 return nullptr;
67 }
68
69 return process_sp;
70}
71
73 bool plugin_specified_by_name) {
74 return true;
75}
76
78 lldb::ListenerSP listener_sp,
79 const ScriptedMetadata &scripted_metadata,
81 : Process(target_sp, listener_sp), m_scripted_metadata(scripted_metadata) {
82
83 if (!target_sp) {
85 "ScriptedProcess::%s () - ERROR: %s", __FUNCTION__, "Invalid target");
86 return;
87 }
88
89 ScriptInterpreter *interpreter =
90 target_sp->GetDebugger().GetScriptInterpreter();
91
92 if (!interpreter) {
94 "ScriptedProcess::%s () - ERROR: %s", __FUNCTION__,
95 "Debugger has no Script Interpreter");
96 return;
97 }
98
99 // Create process instance interface
101 if (!m_interface_up) {
103 "ScriptedProcess::%s () - ERROR: %s", __FUNCTION__,
104 "Script interpreter couldn't create Scripted Process Interface");
105 return;
106 }
107
108 ExecutionContext exe_ctx(target_sp, /*get_process=*/false);
109
110 // Create process script object
111 auto obj_or_err =
113
114 if (!obj_or_err) {
115 llvm::consumeError(obj_or_err.takeError());
116 error = Status::FromErrorString("Failed to create script object.");
117 return;
118 }
119
120 StructuredData::GenericSP object_sp = *obj_or_err;
121
122 if (!object_sp || !object_sp->IsValid()) {
124 "ScriptedProcess::%s () - ERROR: %s", __FUNCTION__,
125 "Failed to create valid script object");
126 return;
127 }
128}
129
131 Clear();
132 // If the interface is not valid, we can't call Finalize(). When that happens
133 // it means that the Scripted Process instanciation failed and the
134 // CreateProcess function returns a nullptr, so no one besides this class
135 // should have access to that bogus process object.
136 if (!m_interface_up)
137 return;
138 // We need to call finalize on the process before destroying ourselves to
139 // make sure all of the broadcaster cleanup goes as planned. If we destruct
140 // this class, then Process::~Process() might have problems trying to fully
141 // destroy the broadcaster.
142 Finalize(true /* destructing */);
143}
144
149
153
156
157 return DoLaunch(nullptr, launch_info);
158}
159
161 ProcessLaunchInfo &launch_info) {
162 LLDB_LOGF(GetLog(LLDBLog::Process), "ScriptedProcess::%s launching process", __FUNCTION__);
163
164 /* MARK: This doesn't reflect how lldb actually launches a process.
165 In reality, it attaches to debugserver, then resume the process.
166 That's not true in all cases. If debugserver is remote, lldb
167 asks debugserver to launch the process for it. */
170 return error;
171}
172
174
176 // Update the PID again, in case the user provided a placeholder pid at launch
178}
179
181 LLDB_LOGF(GetLog(LLDBLog::Process), "ScriptedProcess::%s resuming process", __FUNCTION__);
182
183 if (direction == RunDirection::eRunForward)
184 return GetInterface().Resume();
185 // FIXME: Pipe reverse continue through Scripted Processes
187 "{0} does not support reverse execution of processes", GetPluginName());
188}
189
191 Status error = GetInterface().Attach(attach_info);
194 if (error.Fail())
195 return error;
196 // NOTE: We need to set the PID before finishing to attach otherwise we will
197 // hit an assert when calling the attach completion handler.
198 DidLaunch();
199
200 return {};
201}
202
203Status
205 const ProcessAttachInfo &attach_info) {
206 return DoAttach(attach_info);
207}
208
210 const char *process_name, const ProcessAttachInfo &attach_info) {
211 return DoAttach(attach_info);
212}
213
215 process_arch = GetArchitecture();
216}
217
219
221
222size_t ScriptedProcess::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
223 Status &error) {
224 lldb::DataExtractorSP data_extractor_sp =
226
227 if (!data_extractor_sp || !data_extractor_sp->HasData() || error.Fail())
228 return 0;
229
230 offset_t bytes_copied = data_extractor_sp->CopyByteOrderedData(
231 0, data_extractor_sp->GetByteSize(), buf, size, GetByteOrder());
232
233 if (!bytes_copied || bytes_copied == LLDB_INVALID_OFFSET)
235 LLVM_PRETTY_FUNCTION, "Failed to copy read memory to buffer.", error);
236
237 // FIXME: We should use the diagnostic system to report a warning if the
238 // `bytes_copied` is different from `size`.
239
240 return bytes_copied;
241}
242
243size_t ScriptedProcess::DoWriteMemory(lldb::addr_t vm_addr, const void *buf,
244 size_t size, Status &error) {
245 lldb::DataExtractorSP data_extractor_sp = std::make_shared<DataExtractor>(
246 buf, size, GetByteOrder(), GetAddressByteSize());
247
248 if (!data_extractor_sp || !data_extractor_sp->HasData())
249 return 0;
250
251 lldb::offset_t bytes_written =
252 GetInterface().WriteMemoryAtAddress(vm_addr, data_extractor_sp, error);
253
254 if (!bytes_written || bytes_written == LLDB_INVALID_OFFSET)
256 LLVM_PRETTY_FUNCTION, "Failed to copy write buffer to memory.", error);
257
258 // FIXME: We should use the diagnostic system to report a warning if the
259 // `bytes_written` is different from `size`.
260
261 return bytes_written;
262}
263
265 assert(bp_site != nullptr);
266
267 if (IsBreakpointSitePhysicallyEnabled(*bp_site)) {
268 return {};
269 }
270
271 if (bp_site->HardwareRequired()) {
273 "Scripted Processes don't support hardware breakpoints");
274 }
275
278
279 return error;
280}
281
285
287 MemoryRegionInfo &region) {
289 if (auto region_or_err =
290 GetInterface().GetMemoryRegionContainingAddress(load_addr, error))
291 region = *region_or_err;
292
293 return error;
294}
295
298 lldb::addr_t address = 0;
299
300 while (auto region_or_err =
301 GetInterface().GetMemoryRegionContainingAddress(address, error)) {
302 if (error.Fail())
303 break;
304
305 MemoryRegionInfo &mem_region = *region_or_err;
306 auto range = mem_region.GetRange();
307 address += range.GetRangeBase() + range.GetByteSize();
308 region_list.push_back(mem_region);
309 }
310
311 return error;
312}
313
315
317 ThreadList &new_thread_list) {
318 // TODO: Implement
319 // This is supposed to get the current set of threads, if any of them are in
320 // old_thread_list then they get copied to new_thread_list, and then any
321 // actually new threads will get added to new_thread_list.
322 m_thread_plans.ClearThreadCache();
323
326
327 if (!thread_info_sp)
329 LLVM_PRETTY_FUNCTION,
330 "Couldn't fetch thread list from Scripted Process.", error);
331
332 // Because `StructuredData::Dictionary` uses a `std::map<ConstString,
333 // ObjectSP>` for storage, each item is sorted based on the key alphabetical
334 // order. Since `GetThreadsInfo` provides thread indices as the key element,
335 // thread info comes ordered alphabetically, instead of numerically, so we
336 // need to sort the thread indices before creating thread.
337
338 StructuredData::ArraySP keys = thread_info_sp->GetKeys();
339
340 std::map<size_t, StructuredData::ObjectSP> sorted_threads;
341 auto sort_keys = [&sorted_threads,
342 &thread_info_sp](StructuredData::Object *item) -> bool {
343 if (!item)
344 return false;
345
346 llvm::StringRef key = item->GetStringValue();
347 size_t idx = 0;
348
349 // Make sure the provided index is actually an integer
350 if (!llvm::to_integer(key, idx))
351 return false;
352
353 sorted_threads[idx] = thread_info_sp->GetValueForKey(key);
354 return true;
355 };
356
357 size_t thread_count = thread_info_sp->GetSize();
358
359 if (!keys->ForEach(sort_keys) || sorted_threads.size() != thread_count)
360 // Might be worth showing the unsorted thread list instead of return early.
362 LLVM_PRETTY_FUNCTION, "Couldn't sort thread list.", error);
363
364 auto create_scripted_thread =
365 [this, &error, &new_thread_list](
366 const std::pair<size_t, StructuredData::ObjectSP> pair) -> bool {
367 size_t idx = pair.first;
368 StructuredData::ObjectSP object_sp = pair.second;
369
370 if (!object_sp)
372 LLVM_PRETTY_FUNCTION, "Invalid thread info object", error);
373
374 auto thread_or_error =
375 ScriptedThread::Create(*this, object_sp->GetAsGeneric());
376
377 if (!thread_or_error)
379 LLVM_PRETTY_FUNCTION, toString(thread_or_error.takeError()), error);
380
381 ThreadSP thread_sp = thread_or_error.get();
382 lldbassert(thread_sp && "Couldn't initialize scripted thread.");
383
384 RegisterContextSP reg_ctx_sp = thread_sp->GetRegisterContext();
385 if (!reg_ctx_sp)
387 LLVM_PRETTY_FUNCTION,
388 llvm::Twine("Invalid Register Context for thread " + llvm::Twine(idx))
389 .str(),
390 error);
391
392 new_thread_list.AddThread(thread_sp);
393
394 return true;
395 };
396
397 llvm::for_each(sorted_threads, create_scripted_thread);
398
399 return new_thread_list.GetSize(false) > 0;
400}
401
403 // Let all threads recover from stopping and do any clean up based on the
404 // previous thread state (if any).
405 m_thread_list.RefreshStateAfterStop();
406}
407
409 info.Clear();
410 info.SetProcessID(GetID());
413 if (module_sp) {
414 const bool add_exe_file_as_first_arg = false;
415 info.SetExecutableFile(GetTarget().GetExecutableModule()->GetFileSpec(),
416 add_exe_file_as_first_arg);
417 }
418 return true;
419}
420
423 BinaryInformationLevel info_level) {
425 auto error_with_message = [&error](llvm::StringRef message) {
426 return ScriptedInterface::ErrorWithMessage<bool>(LLVM_PRETTY_FUNCTION,
427 message.data(), error);
428 };
429
431
432 if (!loaded_images_sp || !loaded_images_sp->GetSize())
434 LLVM_PRETTY_FUNCTION, "No loaded images.", error);
435
436 ModuleList module_list;
437 Target &target = GetTarget();
438
439 auto reload_image = [&target, &module_list, &error_with_message](
440 StructuredData::Object *obj) -> bool {
442
443 if (!dict)
444 return error_with_message("Couldn't cast image object into dictionary.");
445
446 ModuleSpec module_spec;
447
448 bool has_path = dict->HasKey("path");
449 bool has_uuid = dict->HasKey("uuid");
450 if (!has_path && !has_uuid)
451 return error_with_message("Dictionary should have key 'path' or 'uuid'");
452 if (!dict->HasKey("load_addr"))
453 return error_with_message("Dictionary is missing key 'load_addr'");
454
455 llvm::StringRef path = "";
456 if (has_path) {
457 dict->GetValueForKeyAsString("path", path);
458 module_spec.GetFileSpec().SetPath(path);
459 }
460
461 llvm::StringRef uuid = "";
462 if (has_uuid) {
463 dict->GetValueForKeyAsString("uuid", uuid);
464 module_spec.GetUUID().SetFromStringRef(uuid);
465 }
466
469 dict->GetValueForKeyAsInteger("load_addr", load_addr);
470 dict->GetValueForKeyAsInteger("slide", slide);
471 if (load_addr == LLDB_INVALID_ADDRESS)
472 return error_with_message(
473 "Couldn't get valid load address or slide offset.");
474
475 if (slide != LLDB_INVALID_OFFSET)
476 load_addr += slide;
477
478 module_spec.GetArchitecture() = target.GetArchitecture();
479
480 ModuleSP module_sp =
481 target.GetOrCreateModule(module_spec, true /* notify */);
482
483 bool is_placeholder_module = false;
484
485 if (!module_sp) {
486 // Create a placeholder module
487 LLDB_LOGF(
489 "ScriptedProcess::%s unable to locate the matching "
490 "object file path %s, creating a placeholder module at 0x%" PRIx64,
491 __FUNCTION__, path.str().c_str(), load_addr);
492
494 module_spec, load_addr, module_spec.GetFileSpec().MemorySize());
495
496 is_placeholder_module = true;
497 }
498
499 bool changed = false;
500 module_sp->SetLoadAddress(target, load_addr, false /*=value_is_offset*/,
501 changed);
502
503 if (!changed && !module_sp->GetObjectFile())
504 return error_with_message("Couldn't set the load address for module.");
505
506 FileSpec objfile(path);
507 module_sp->SetFileSpecAndObjectName(objfile, objfile.GetFilename());
508
509 if (is_placeholder_module) {
510 target.GetImages().AppendIfNeeded(module_sp, true /*notify=*/);
511 return true;
512 }
513
514 return module_list.AppendIfNeeded(module_sp);
515 };
516
517 size_t loaded_images_size = loaded_images_sp->GetSize();
518 bool print_error = true;
519 for (size_t idx = 0; idx < loaded_images_size; idx++) {
520 const auto &loaded_image = loaded_images_sp->GetItemAtIndex(idx);
521 if (!reload_image(loaded_image.get()) && print_error) {
522 print_error = false;
524 LLVM_PRETTY_FUNCTION, "Couldn't reload all images.", error);
525 }
526 }
527
528 target.ModulesDidLoad(module_list);
529
530 return loaded_images_sp;
531}
532
535
537 if (!metadata_sp || !metadata_sp->GetSize())
539 LLVM_PRETTY_FUNCTION, "No metadata.", error);
540
541 return metadata_sp;
542}
543
546 for (ThreadSP thread_sp : Threads()) {
547 if (const char *queue_name = thread_sp->GetQueueName()) {
548 QueueSP queue_sp = std::make_shared<Queue>(
549 m_process->shared_from_this(), thread_sp->GetQueueID(), queue_name);
550 m_queue_list.AddQueue(queue_sp);
551 }
552 }
553}
554
559
561 StructuredData::GenericSP object_instance_sp =
563 if (object_instance_sp &&
564 object_instance_sp->GetType() == eStructuredDataTypeGeneric)
565 return object_instance_sp->GetAsGeneric()->GetValue();
566 return nullptr;
567}
static llvm::raw_ostream & error(Stream &strm)
#define lldbassert(x)
Definition LLDBAssert.h:16
#define LLDB_LOGF(log,...)
Definition Log.h:378
#define LLDB_PLUGIN_DEFINE(PluginName)
static constexpr lldb::ScriptLanguage g_supported_script_languages[]
An architecture specification class.
Definition ArchSpec.h:32
Class that manages the actual breakpoint that will be inserted into the running program.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A file utility class.
Definition FileSpec.h:57
const ConstString & GetFilename() const
Filename string const get accessor.
Definition FileSpec.h:250
void SetPath(llvm::StringRef p)
Temporary helper for FileSystem change.
Definition FileSpec.h:289
size_t MemorySize() const
Get the memory cost of this object.
Definition FileSpec.cpp:420
A collection class for Module objects.
Definition ModuleList.h:125
bool AppendIfNeeded(const lldb::ModuleSP &new_module, bool notify=true)
Append a module to the module list, if it is not already there.
FileSpec & GetFileSpec()
Definition ModuleSpec.h:57
ArchSpec & GetArchitecture()
Definition ModuleSpec.h:93
A class that describes an executable image and its associated object and symbol files.
Definition Module.h:91
static lldb::ModuleSP CreateModuleFromObjectFile(Args &&...args)
Definition Module.h:136
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
void SetArchitecture(const ArchSpec &arch)
Definition ProcessInfo.h:66
void SetProcessID(lldb::pid_t pid)
Definition ProcessInfo.h:70
lldb::pid_t GetID() const
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
Definition Process.h:540
Process(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
Construct with a shared pointer to a target, and the Process listener.
Definition Process.cpp:451
QueueList m_queue_list
The list of libdispatch queues at a given stop point.
Definition Process.h:3504
bool IsBreakpointSitePhysicallyEnabled(const BreakpointSite &site)
Definition Process.cpp:1666
lldb::ByteOrder GetByteOrder() const
Definition Process.cpp:3909
ThreadList::ThreadIterable Threads()
Definition Process.h:2393
ThreadPlanStackMap m_thread_plans
This is the list of thread plans for threads in m_thread_list, as well as threads we knew existed,...
Definition Process.h:3493
friend class Target
Definition Process.h:363
uint32_t GetAddressByteSize() const
Definition Process.cpp:3913
void SetPrivateState(lldb::StateType state)
Definition Process.cpp:1402
virtual void Finalize(bool destructing)
This object is about to be destroyed, do any necessary cleanup.
Definition Process.cpp:561
ThreadList m_thread_list
The threads for this process as the user will see them.
Definition Process.h:3489
lldb::pid_t m_pid
Definition Process.h:3457
friend class ThreadList
Definition Process.h:364
Target & GetTarget()
Get the target object pointer for this module.
Definition Process.h:1255
virtual lldb::ScriptedProcessInterfaceUP CreateScriptedProcessInterface()
static Ret ErrorWithMessage(llvm::StringRef caller_name, llvm::StringRef error_msg, Status &error, LLDBLog log_category=LLDBLog::Process)
StructuredData::GenericSP GetScriptObjectInstance()
virtual lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size, Status &error)
virtual StructuredData::DictionarySP GetThreadsInfo()
virtual Status Attach(const ProcessAttachInfo &attach_info)
virtual bool CreateBreakpoint(lldb::addr_t addr, Status &error)
virtual StructuredData::DictionarySP GetMetadata()
virtual StructuredData::ArraySP GetLoadedImages()
virtual lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr, lldb::DataExtractorSP data_sp, Status &error)
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, ExecutionContext &exe_ctx, StructuredData::Generic *script_obj=nullptr)=0
Status DoAttachToProcessWithID(lldb::pid_t pid, const ProcessAttachInfo &attach_info) override
Attach to an existing process using a process ID.
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
bool DoUpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Actually do the reading of memory from a process.
const ScriptedMetadata m_scripted_metadata
void DidAttach(ArchSpec &process_arch) override
Called after attaching a process.
static llvm::StringRef GetPluginNameStatic()
Status GetMemoryRegions(lldb_private::MemoryRegionInfos &region_list) override
Obtain all the mapped memory regions within this process.
static bool IsScriptLanguageSupported(lldb::ScriptLanguage language)
bool IsAlive() override
Check if a process is still alive.
Status DoAttach(const ProcessAttachInfo &attach_info)
bool GetProcessInfo(ProcessInstanceInfo &info) override
lldb_private::StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos(lldb::BinaryInformationLevel info_level) override
Retrieve a StructuredData dictionary about all of the binaries loaded in the process at this time.
void DidResume() override
Called after resuming a process.
Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override
Launch a new process.
size_t DoWriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size, Status &error) override
Actually do the writing of memory to a process.
Status DoResume(lldb::RunDirection direction) override
Resumes all of a process's threads as configured using the Thread run control functions.
ScriptedProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const ScriptedMetadata &scripted_metadata, Status &error)
lldb::ScriptedProcessInterfaceUP m_interface_up
llvm::StringRef GetPluginName() override
Status EnableBreakpointSite(BreakpointSite *bp_site) override
lldb_private::StructuredData::DictionarySP GetMetadata() override
Fetch process defined metadata.
Status DoAttachToProcessWithName(const char *process_name, const ProcessAttachInfo &attach_info) override
Attach to an existing process using a partial process name.
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
static llvm::StringRef GetPluginDescriptionStatic()
ScriptedProcessInterface & GetInterface() const
void DidLaunch() override
Called after launching a process.
Status DoGetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &range_info) override
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from loa...
static llvm::Expected< std::shared_ptr< ScriptedThread > > Create(ScriptedProcess &process, StructuredData::Generic *script_object=nullptr)
An error handling class.
Definition Status.h:118
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Definition Status.cpp:106
static Status FromErrorString(const char *str)
Definition Status.h:141
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
Definition Status.h:151
virtual lldb::addr_t GetLoadAddress() const
bool GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const
bool GetValueForKeyAsString(llvm::StringRef key, llvm::StringRef &result) const
bool HasKey(llvm::StringRef key) const
std::shared_ptr< Generic > GenericSP
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
std::shared_ptr< Array > ArraySP
const ProcessLaunchInfo & GetProcessLaunchInfo() const
Definition Target.cpp:5738
void ModulesDidLoad(ModuleList &module_list)
This call may preload module symbols, and may do so in parallel depending on the following target set...
Definition Target.cpp:1909
lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
Find a binary on the system and return its Module, or return an existing Module that is already in th...
Definition Target.cpp:2409
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition Target.cpp:1593
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition Target.h:1241
const ArchSpec & GetArchitecture() const
Definition Target.h:1283
void AddThread(const lldb::ThreadSP &thread_sp)
uint32_t GetSize(bool can_update=true)
bool SetFromStringRef(llvm::StringRef str)
Definition UUID.cpp:101
#define LLDB_INVALID_ADDRESS
#define LLDB_INVALID_OFFSET
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.
Definition Log.h:327
std::string toString(FormatterBytecode::OpCodes op)
ScriptLanguage
Script interpreter types.
@ eScriptLanguagePython
std::shared_ptr< lldb_private::Queue > QueueSP
RunDirection
Execution directions.
std::shared_ptr< lldb_private::Thread > ThreadSP
uint64_t offset_t
Definition lldb-types.h:85
@ eStateStopped
Process or thread is stopped and can be examined.
@ eStateRunning
Process or thread is running and can't be examined.
std::shared_ptr< lldb_private::Process > ProcessSP
uint64_t pid_t
Definition lldb-types.h:83
std::shared_ptr< lldb_private::Listener > ListenerSP
uint64_t addr_t
Definition lldb-types.h:80
BinaryInformationLevel
When the Process plugin can retrieve information about all binaries loaded in the target process,...
std::shared_ptr< lldb_private::Target > TargetSP
@ eStructuredDataTypeGeneric
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::Module > ModuleSP