LLDB  mainline
AppleGetThreadItemInfoHandler.cpp
Go to the documentation of this file.
1 //===-- AppleGetThreadItemInfoHandler.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 
10 
12 #include "lldb/Core/Module.h"
13 #include "lldb/Core/Value.h"
18 #include "lldb/Symbol/Symbol.h"
20 #include "lldb/Target/Process.h"
21 #include "lldb/Target/StackFrame.h"
22 #include "lldb/Target/Target.h"
23 #include "lldb/Target/Thread.h"
25 #include "lldb/Utility/Log.h"
27 #include "lldb/lldb-private.h"
28 
29 using namespace lldb;
30 using namespace lldb_private;
31 
32 const char
33  *AppleGetThreadItemInfoHandler::g_get_thread_item_info_function_name =
34  "__lldb_backtrace_recording_get_thread_item_info";
35 const char
36  *AppleGetThreadItemInfoHandler::g_get_thread_item_info_function_code =
37  " \n\
38 extern \"C\" \n\
39 { \n\
40  /* \n\
41  * mach defines \n\
42  */ \n\
43  \n\
44  typedef unsigned int uint32_t; \n\
45  typedef unsigned long long uint64_t; \n\
46  typedef uint32_t mach_port_t; \n\
47  typedef mach_port_t vm_map_t; \n\
48  typedef int kern_return_t; \n\
49  typedef uint64_t mach_vm_address_t; \n\
50  typedef uint64_t mach_vm_size_t; \n\
51  \n\
52  mach_port_t mach_task_self (); \n\
53  kern_return_t mach_vm_deallocate (vm_map_t target, mach_vm_address_t address, mach_vm_size_t size); \n\
54  \n\
55  typedef void *pthread_t; \n\
56  extern int printf(const char *format, ...); \n\
57  extern pthread_t pthread_self(void); \n\
58  \n\
59  /* \n\
60  * libBacktraceRecording defines \n\
61  */ \n\
62  \n\
63  typedef uint32_t queue_list_scope_t; \n\
64  typedef void *dispatch_queue_t; \n\
65  typedef void *introspection_dispatch_queue_info_t; \n\
66  typedef void *introspection_dispatch_item_info_ref; \n\
67  \n\
68  extern void __introspection_dispatch_thread_get_item_info (uint64_t thread_id, \n\
69  introspection_dispatch_item_info_ref *returned_queues_buffer, \n\
70  uint64_t *returned_queues_buffer_size); \n\
71  \n\
72  /* \n\
73  * return type define \n\
74  */ \n\
75  \n\
76  struct get_thread_item_info_return_values \n\
77  { \n\
78  uint64_t item_info_buffer_ptr; /* the address of the items buffer from libBacktraceRecording */ \n\
79  uint64_t item_info_buffer_size; /* the size of the items buffer from libBacktraceRecording */ \n\
80  }; \n\
81  \n\
82  void __lldb_backtrace_recording_get_thread_item_info \n\
83  (struct get_thread_item_info_return_values *return_buffer, \n\
84  int debug, \n\
85  uint64_t thread_id, \n\
86  void *page_to_free, \n\
87  uint64_t page_to_free_size) \n\
88 { \n\
89  void *pthread_id = pthread_self (); \n\
90  if (debug) \n\
91  printf (\"entering get_thread_item_info with args return_buffer == %p, debug == %d, thread id == 0x%llx, page_to_free == %p, page_to_free_size == 0x%llx\\n\", return_buffer, debug, (uint64_t) thread_id, page_to_free, page_to_free_size); \n\
92  if (page_to_free != 0) \n\
93  { \n\
94  mach_vm_deallocate (mach_task_self(), (mach_vm_address_t) page_to_free, (mach_vm_size_t) page_to_free_size); \n\
95  } \n\
96  \n\
97  __introspection_dispatch_thread_get_item_info (thread_id, \n\
98  (void**)&return_buffer->item_info_buffer_ptr, \n\
99  &return_buffer->item_info_buffer_size); \n\
100 } \n\
101 } \n\
102 ";
103 
104 AppleGetThreadItemInfoHandler::AppleGetThreadItemInfoHandler(Process *process)
105  : m_process(process), m_get_thread_item_info_impl_code(),
106  m_get_thread_item_info_function_mutex(),
107  m_get_thread_item_info_return_buffer_addr(LLDB_INVALID_ADDRESS),
108  m_get_thread_item_info_retbuffer_mutex() {}
109 
111 
113 
114  if (m_process && m_process->IsAlive() &&
116  std::unique_lock<std::mutex> lock(m_get_thread_item_info_retbuffer_mutex,
117  std::defer_lock);
118  (void)lock.try_lock(); // Even if we don't get the lock, deallocate the buffer
120  }
121 }
122 
123 // Compile our __lldb_backtrace_recording_get_thread_item_info() function (from
124 // the source above in g_get_thread_item_info_function_code) if we don't find
125 // that function in the inferior already with USE_BUILTIN_FUNCTION defined.
126 // (e.g. this would be the case for testing.)
127 //
128 // Insert the __lldb_backtrace_recording_get_thread_item_info into the inferior
129 // process if needed.
130 //
131 // Write the get_thread_item_info_arglist into the inferior's memory space to
132 // prepare for the call.
133 //
134 // Returns the address of the arguments written down in the inferior process,
135 // which can be used to make the function call.
136 
138  Thread &thread, ValueList &get_thread_item_info_arglist) {
139  ThreadSP thread_sp(thread.shared_from_this());
140  ExecutionContext exe_ctx(thread_sp);
141  Address impl_code_address;
142  DiagnosticManager diagnostics;
145  FunctionCaller *get_thread_item_info_caller = nullptr;
146 
147  // Scope for mutex locker:
148  {
149  std::lock_guard<std::mutex> guard(m_get_thread_item_info_function_mutex);
150 
151  // First stage is to make the ClangUtility to hold our injected function:
152 
154  Status error;
155  if (g_get_thread_item_info_function_code != nullptr) {
156  auto utility_fn_or_error = exe_ctx.GetTargetRef().CreateUtilityFunction(
159  if (!utility_fn_or_error) {
160  LLDB_LOG_ERROR(log, utility_fn_or_error.takeError(),
161  "Failed to get UtilityFunction for "
162  "get-thread-item-info introspection: {0}.");
163  return args_addr;
164  }
165  m_get_thread_item_info_impl_code = std::move(*utility_fn_or_error);
166  } else {
167  LLDB_LOGF(log, "No get-thread-item-info introspection code found.");
168  return LLDB_INVALID_ADDRESS;
169  }
170 
171  // Also make the FunctionCaller for this UtilityFunction:
172 
174  thread.GetProcess()->GetTarget());
175  CompilerType get_thread_item_info_return_type =
176  clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
177 
178  get_thread_item_info_caller =
179  m_get_thread_item_info_impl_code->MakeFunctionCaller(
180  get_thread_item_info_return_type, get_thread_item_info_arglist,
181  thread_sp, error);
182  if (error.Fail() || get_thread_item_info_caller == nullptr) {
183  LLDB_LOGF(log,
184  "Failed to install get-thread-item-info introspection "
185  "caller: %s.",
186  error.AsCString());
188  return args_addr;
189  }
190 
191  } else {
192  get_thread_item_info_caller =
193  m_get_thread_item_info_impl_code->GetFunctionCaller();
194  }
195  }
196 
197  diagnostics.Clear();
198 
199  // Now write down the argument values for this particular call. This looks
200  // like it might be a race condition if other threads were calling into here,
201  // but actually it isn't because we allocate a new args structure for this
202  // call by passing args_addr = LLDB_INVALID_ADDRESS...
203 
204  if (!get_thread_item_info_caller->WriteFunctionArguments(
205  exe_ctx, args_addr, get_thread_item_info_arglist, diagnostics)) {
206  if (log) {
207  LLDB_LOGF(log, "Error writing get-thread-item-info function arguments");
208  diagnostics.Dump(log);
209  }
210  return args_addr;
211  }
212 
213  return args_addr;
214 }
215 
218  tid_t thread_id,
219  addr_t page_to_free,
220  uint64_t page_to_free_size,
221  Status &error) {
222  lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
223  ProcessSP process_sp(thread.CalculateProcess());
224  TargetSP target_sp(thread.CalculateTarget());
225  TypeSystemClang *clang_ast_context =
228 
229  GetThreadItemInfoReturnInfo return_value;
230  return_value.item_buffer_ptr = LLDB_INVALID_ADDRESS;
231  return_value.item_buffer_size = 0;
232 
233  error.Clear();
234 
235  if (!thread.SafeToCallFunctions()) {
236  LLDB_LOGF(log, "Not safe to call functions on thread 0x%" PRIx64,
237  thread.GetID());
238  error.SetErrorString("Not safe to call functions on this thread.");
239  return return_value;
240  }
241 
242  // Set up the arguments for a call to
243 
244  // struct get_thread_item_info_return_values {
245  // uint64_t item_info_buffer_ptr; /* the address of the items buffer
246  // from libBacktraceRecording */
247  // uint64_t item_info_buffer_size; /* the size of the items buffer from
248  // libBacktraceRecording */
249  // };
250  //
251  // void __lldb_backtrace_recording_get_thread_item_info
252  // (struct
253  // get_thread_item_info_return_values
254  // *return_buffer,
255  // int debug,
256  // void *page_to_free,
257  // uint64_t page_to_free_size)
258 
259  // Where the return_buffer argument points to a 24 byte region of memory
260  // already allocated by lldb in the inferior process.
261 
262  CompilerType clang_void_ptr_type =
263  clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
264  Value return_buffer_ptr_value;
265  return_buffer_ptr_value.SetValueType(Value::ValueType::Scalar);
266  return_buffer_ptr_value.SetCompilerType(clang_void_ptr_type);
267 
268  CompilerType clang_int_type = clang_ast_context->GetBasicType(eBasicTypeInt);
269  Value debug_value;
271  debug_value.SetCompilerType(clang_int_type);
272 
273  CompilerType clang_uint64_type =
274  clang_ast_context->GetBasicType(eBasicTypeUnsignedLongLong);
275  Value thread_id_value;
276  thread_id_value.SetValueType(Value::ValueType::Scalar);
277  thread_id_value.SetCompilerType(clang_uint64_type);
278 
279  Value page_to_free_value;
280  page_to_free_value.SetValueType(Value::ValueType::Scalar);
281  page_to_free_value.SetCompilerType(clang_void_ptr_type);
282 
283  Value page_to_free_size_value;
284  page_to_free_size_value.SetValueType(Value::ValueType::Scalar);
285  page_to_free_size_value.SetCompilerType(clang_uint64_type);
286 
287  std::lock_guard<std::mutex> guard(m_get_thread_item_info_retbuffer_mutex);
289  addr_t bufaddr = process_sp->AllocateMemory(
290  32, ePermissionsReadable | ePermissionsWritable, error);
291  if (!error.Success() || bufaddr == LLDB_INVALID_ADDRESS) {
292  LLDB_LOGF(log, "Failed to allocate memory for return buffer for get "
293  "current queues func call");
294  return return_value;
295  }
297  }
298 
299  ValueList argument_values;
300 
301  return_buffer_ptr_value.GetScalar() =
303  argument_values.PushValue(return_buffer_ptr_value);
304 
305  debug_value.GetScalar() = 0;
306  argument_values.PushValue(debug_value);
307 
308  thread_id_value.GetScalar() = thread_id;
309  argument_values.PushValue(thread_id_value);
310 
311  if (page_to_free != LLDB_INVALID_ADDRESS)
312  page_to_free_value.GetScalar() = page_to_free;
313  else
314  page_to_free_value.GetScalar() = 0;
315  argument_values.PushValue(page_to_free_value);
316 
317  page_to_free_size_value.GetScalar() = page_to_free_size;
318  argument_values.PushValue(page_to_free_size_value);
319 
320  addr_t args_addr = SetupGetThreadItemInfoFunction(thread, argument_values);
321 
322  DiagnosticManager diagnostics;
323  ExecutionContext exe_ctx;
325  FunctionCaller *get_thread_item_info_caller = nullptr;
326 
327  options.SetUnwindOnError(true);
328  options.SetIgnoreBreakpoints(true);
329  options.SetStopOthers(true);
330 #if __has_feature(address_sanitizer)
331  options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
332 #else
333  options.SetTimeout(std::chrono::milliseconds(500));
334 #endif
335  options.SetTryAllThreads(false);
336  options.SetIsForUtilityExpr(true);
337  thread.CalculateExecutionContext(exe_ctx);
338 
340  error.SetErrorString("Unable to compile function to call "
341  "__introspection_dispatch_thread_get_item_info");
342  return return_value;
343  }
344 
345  get_thread_item_info_caller =
346  m_get_thread_item_info_impl_code->GetFunctionCaller();
347 
348  if (!get_thread_item_info_caller) {
349  error.SetErrorString("Unable to compile function caller for "
350  "__introspection_dispatch_thread_get_item_info");
351  return return_value;
352  }
353 
354  ExpressionResults func_call_ret;
355  Value results;
356  func_call_ret = get_thread_item_info_caller->ExecuteFunction(
357  exe_ctx, &args_addr, options, diagnostics, results);
358  if (func_call_ret != eExpressionCompleted || !error.Success()) {
359  LLDB_LOGF(log,
360  "Unable to call "
361  "__introspection_dispatch_thread_get_item_info(), got "
362  "ExpressionResults %d, error contains %s",
363  func_call_ret, error.AsCString(""));
364  error.SetErrorString("Unable to call "
365  "__introspection_dispatch_thread_get_item_info() for "
366  "list of queues");
367  return return_value;
368  }
369 
372  error);
373  if (!error.Success() ||
374  return_value.item_buffer_ptr == LLDB_INVALID_ADDRESS) {
375  return_value.item_buffer_ptr = LLDB_INVALID_ADDRESS;
376  return return_value;
377  }
378 
381 
382  if (!error.Success()) {
383  return_value.item_buffer_ptr = LLDB_INVALID_ADDRESS;
384  return return_value;
385  }
386 
387  LLDB_LOGF(log,
388  "AppleGetThreadItemInfoHandler called "
389  "__introspection_dispatch_thread_get_item_info (page_to_free "
390  "== 0x%" PRIx64 ", size = %" PRId64
391  "), returned page is at 0x%" PRIx64 ", size %" PRId64,
392  page_to_free, page_to_free_size, return_value.item_buffer_ptr,
393  return_value.item_buffer_size);
394 
395  return return_value;
396 }
lldb_private::AppleGetThreadItemInfoHandler::g_get_thread_item_info_function_name
static const char * g_get_thread_item_info_function_name
Definition: AppleGetThreadItemInfoHandler.h:97
lldb_private::Value::ValueType::Scalar
@ Scalar
A raw scalar value.
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::Process::DeallocateMemory
Status DeallocateMemory(lldb::addr_t ptr)
The public interface to deallocating memory in the process.
Definition: Process.cpp:2332
FunctionCaller.h
lldb_private::EvaluateExpressionOptions::SetTimeout
void SetTimeout(const Timeout< std::micro > &timeout)
Definition: Target.h:321
lldb_private::Value
Definition: Value.h:38
lldb_private::Value::SetValueType
void SetValueType(ValueType value_type)
Definition: Value.h:89
lldb_private::DiagnosticManager::Dump
void Dump(Log *log)
Definition: DiagnosticManager.cpp:18
lldb::ExpressionResults
ExpressionResults
The results of expression evaluation.
Definition: lldb-enumerations.h:270
AppleGetThreadItemInfoHandler.h
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::Process
Definition: Process.h:341
lldb_private::Thread::CalculateTarget
lldb::TargetSP CalculateTarget() override
Definition: Thread.cpp:1390
lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr
void SetIsForUtilityExpr(bool b)
Definition: Target.h:408
Module.h
lldb_private::EvaluateExpressionOptions
Definition: Target.h:253
lldb_private::AppleGetThreadItemInfoHandler::m_process
lldb_private::Process * m_process
Definition: AppleGetThreadItemInfoHandler.h:100
lldb_private::ValueList
Definition: Value.h:157
LIBLLDB_LOG_SYSTEM_RUNTIME
#define LIBLLDB_LOG_SYSTEM_RUNTIME
Definition: Logging.h:40
StackFrame.h
lldb_private::Process::IsAlive
virtual bool IsAlive()
Check if a process is still alive.
Definition: Process.cpp:1049
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfoReturnInfo::item_buffer_size
lldb::addr_t item_buffer_size
Definition: AppleGetThreadItemInfoHandler.h:52
lldb_private::Thread::SafeToCallFunctions
virtual bool SafeToCallFunctions()
Check whether this thread is safe to run functions.
Definition: Thread.cpp:1648
lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfoReturnInfo
Definition: AppleGetThreadItemInfoHandler.h:49
Process.h
lldb_private::Value::SetCompilerType
void SetCompilerType(const CompilerType &compiler_type)
Definition: Value.cpp:254
Target.h
lldb_private::AppleGetThreadItemInfoHandler::m_get_thread_item_info_impl_code
std::unique_ptr< UtilityFunction > m_get_thread_item_info_impl_code
Definition: AppleGetThreadItemInfoHandler.h:101
lldb_private::Value::GetScalar
const Scalar & GetScalar() const
Definition: Value.h:112
lldb_private::Thread::GetProcess
lldb::ProcessSP GetProcess() const
Definition: Thread.h:154
lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfoReturnInfo::item_buffer_ptr
lldb::addr_t item_buffer_ptr
Definition: AppleGetThreadItemInfoHandler.h:50
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ValueList::PushValue
void PushValue(const Value &value)
Definition: Value.cpp:675
lldb_private::Thread::CalculateProcess
lldb::ProcessSP CalculateProcess() override
Definition: Thread.cpp:1398
lldb_private::FunctionCaller::WriteFunctionArguments
bool WriteFunctionArguments(ExecutionContext &exe_ctx, lldb::addr_t &args_addr_ref, DiagnosticManager &diagnostic_manager)
Insert the default function argument struct.
Definition: FunctionCaller.cpp:115
Log.h
TypeSystemClang.h
lldb_private::Thread
Definition: Thread.h:62
lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction
lldb::addr_t SetupGetThreadItemInfoFunction(Thread &thread, ValueList &get_thread_item_info_arglist)
Definition: AppleGetThreadItemInfoHandler.cpp:137
lldb_private::AppleGetThreadItemInfoHandler::~AppleGetThreadItemInfoHandler
~AppleGetThreadItemInfoHandler()
lldb::eExpressionCompleted
@ eExpressionCompleted
Definition: lldb-enumerations.h:271
StreamString.h
lldb::eBasicTypeInt
@ eBasicTypeInt
Definition: lldb-enumerations.h:754
lldb_private::Target::CreateUtilityFunction
llvm::Expected< std::unique_ptr< UtilityFunction > > CreateUtilityFunction(std::string expression, std::string name, lldb::LanguageType language, ExecutionContext &exe_ctx)
Creates and installs a UtilityFunction for the given language.
Definition: Target.cpp:2319
lldb_private::EvaluateExpressionOptions::SetTryAllThreads
void SetTryAllThreads(bool try_others=true)
Definition: Target.h:333
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo
GetThreadItemInfoReturnInfo GetThreadItemInfo(Thread &thread, lldb::tid_t thread_id, lldb::addr_t page_to_free, uint64_t page_to_free_size, lldb_private::Status &error)
Get the information about a work item by calling __introspection_dispatch_thread_get_item_info.
Definition: AppleGetThreadItemInfoHandler.cpp:217
lldb_private::AppleGetThreadItemInfoHandler::Detach
void Detach()
Definition: AppleGetThreadItemInfoHandler.cpp:112
lldb::eBasicTypeVoid
@ eBasicTypeVoid
Definition: lldb-enumerations.h:743
lldb_private::AppleGetThreadItemInfoHandler::m_get_thread_item_info_return_buffer_addr
lldb::addr_t m_get_thread_item_info_return_buffer_addr
Definition: AppleGetThreadItemInfoHandler.h:104
lldb::eBasicTypeUnsignedLongLong
@ eBasicTypeUnsignedLongLong
Definition: lldb-enumerations.h:759
lldb_private::EvaluateExpressionOptions::SetUnwindOnError
void SetUnwindOnError(bool unwind=false)
Definition: Target.h:300
Thread.h
lldb_private::UserID::GetID
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:47
lldb_private::Thread::CalculateExecutionContext
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
Definition: Thread.cpp:1404
UtilityFunction.h
lldb-private.h
lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints
void SetIgnoreBreakpoints(bool ignore=false)
Definition: Target.h:304
Symbol.h
lldb_private::Status
Definition: Status.h:44
lldb_private::CompilerType::GetPointerType
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
Definition: CompilerType.cpp:407
lldb_private::Address
Definition: Address.h:59
lldb_private::DiagnosticManager
Definition: DiagnosticManager.h:93
lldb_private::ScratchTypeSystemClang::GetForTarget
static TypeSystemClang * GetForTarget(Target &target, llvm::Optional< IsolatedASTKind > ast_kind=DefaultAST, bool create_on_demand=true)
Returns the scratch TypeSystemClang for the given target.
Definition: TypeSystemClang.cpp:9739
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:86
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
DiagnosticManager.h
lldb_private::DiagnosticManager::Clear
void Clear()
Definition: DiagnosticManager.h:95
lldb_private::ExecutionContext::GetTargetRef
Target & GetTargetRef() const
Returns a reference to the target object.
Definition: ExecutionContext.cpp:226
lldb::eLanguageTypeC
@ eLanguageTypeC
Non-standardized C, such as K&R.
Definition: lldb-enumerations.h:439
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::FunctionCaller::ExecuteFunction
lldb::ExpressionResults ExecuteFunction(ExecutionContext &exe_ctx, lldb::addr_t *args_addr_ptr, const EvaluateExpressionOptions &options, DiagnosticManager &diagnostic_manager, Value &results)
Run the function this FunctionCaller was created with.
Definition: FunctionCaller.cpp:313
lldb_private::TypeSystemClang::GetBasicType
CompilerType GetBasicType(lldb::BasicType type)
Definition: TypeSystemClang.cpp:940
lldb_private::TypeSystemClang
A TypeSystem implementation based on Clang.
Definition: TypeSystemClang.h:106
ConstString.h
lldb_private::AppleGetThreadItemInfoHandler::g_get_thread_item_info_function_code
static const char * g_get_thread_item_info_function_code
Definition: AppleGetThreadItemInfoHandler.h:98
lldb_private::AppleGetThreadItemInfoHandler::m_get_thread_item_info_function_mutex
std::mutex m_get_thread_item_info_function_mutex
Definition: AppleGetThreadItemInfoHandler.h:102
lldb_private::Process::ReadUnsignedIntegerFromMemory
uint64_t ReadUnsignedIntegerFromMemory(lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Status &error)
Reads an unsigned integer of the specified byte size from process memory.
Definition: Process.cpp:2064
lldb_private::Log
Definition: Log.h:49
lldb_private::EvaluateExpressionOptions::SetStopOthers
void SetStopOthers(bool stop_others=true)
Definition: Target.h:337
lldb_private::Thread::GetStackFrameAtIndex
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
Definition: Thread.h:399
Expression.h
lldb
Definition: SBAddress.h:15
LLDB_LOG_ERROR
#define LLDB_LOG_ERROR(log, error,...)
Definition: Log.h:265
lldb_private::AppleGetThreadItemInfoHandler::m_get_thread_item_info_retbuffer_mutex
std::mutex m_get_thread_item_info_retbuffer_mutex
Definition: AppleGetThreadItemInfoHandler.h:105
Value.h
ExecutionContext.h
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::FunctionCaller
Definition: FunctionCaller.h:56