LLDB  mainline
DynamicLoaderDarwinKernel.h
Go to the documentation of this file.
1 //===-- DynamicLoaderDarwinKernel.h -----------------------------*- C++ -*-===//
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 #ifndef LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
10 #define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
11 
12 #include <mutex>
13 #include <string>
14 #include <vector>
15 
16 
17 #include "lldb/Host/SafeMachO.h"
18 
20 #include "lldb/Target/Process.h"
21 #include "lldb/Utility/FileSpec.h"
22 #include "lldb/Utility/UUID.h"
23 
25 public:
27  lldb::addr_t kernel_addr);
28 
29  ~DynamicLoaderDarwinKernel() override;
30 
31  // Static Functions
32  static void Initialize();
33 
34  static void Terminate();
35 
36  static llvm::StringRef GetPluginNameStatic() { return "darwin-kernel"; }
37 
38  static llvm::StringRef GetPluginDescriptionStatic();
39 
41  CreateInstance(lldb_private::Process *process, bool force);
42 
43  static void DebuggerInitialize(lldb_private::Debugger &debugger);
44 
46 
47  /// Called after attaching a process.
48  ///
49  /// Allow DynamicLoader plug-ins to execute some code after
50  /// attaching to a process.
51  void DidAttach() override;
52 
53  void DidLaunch() override;
54 
55  lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
56  bool stop_others) override;
57 
59 
60  // PluginInterface protocol
61  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
62 
63 protected:
65 
67  lldb::StateType state);
68 
69  void UpdateIfNeeded();
70 
72 
73  void Clear(bool clear_process);
74 
75  void PutToLog(lldb_private::Log *log) const;
76 
77  static bool
78  BreakpointHitCallback(void *baton,
80  lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
81 
83  lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
85 
87 
88  enum {
90  // Versions less than 2 didn't have an entry size,
91  // they had a 64 bit name, 16 byte UUID, 8 byte addr,
92  // 8 byte size, 8 byte version, 4 byte load tag, and
93  // 4 byte flags
94  KERNEL_MODULE_ENTRY_SIZE_VERSION_1 = 64u + 16u + 8u + 8u + 8u + 4u + 4u
95  };
96 
97  // class KextImageInfo represents a single kext or kernel binary image.
98  // The class was designed to hold the information from the
99  // OSKextLoadedKextSummary
100  // structure (in libkern/libkern/OSKextLibPrivate.h from xnu). The kernel
101  // maintains
102  // a list of loded kexts in memory (the OSKextLoadedKextSummaryHeader
103  // structure,
104  // which points to an array of OSKextLoadedKextSummary's).
105  //
106  // A KextImageInfos may have -
107  //
108  // 1. The load address, name, UUID, and size of a kext/kernel binary in memory
109  // (read straight out of the kernel's list-of-kexts loaded)
110  // 2. A ModuleSP based on a MemoryModule read out of the kernel's memory
111  // (very unlikely to have any symbolic information)
112  // 3. A ModuleSP for an on-disk copy of the kext binary, possibly with debug
113  // info
114  // or a dSYM
115  //
116  // For performance reasons, the developer may prefer that lldb not load the
117  // kexts out
118  // of memory at the start of a kernel session. But we should build up /
119  // maintain a
120  // list of kexts that the kernel has told us about so we can relocate a kext
121  // module
122  // later if the user explicitly adds it to the target.
123 
125  public:
127 
128  void Clear() {
130  m_size = 0;
131  m_name.clear();
132  m_uuid.Clear();
133  m_module_sp.reset();
134  m_memory_module_sp.reset();
136  }
137 
139 
141 
143 
144  void SetLoadAddress(
145  lldb::addr_t load_addr); // Address of the Mach-O header for this binary
146 
148  GetLoadAddress() const; // Address of the Mach-O header for this binary
149 
150  lldb_private::UUID GetUUID() const;
151 
152  void SetUUID(const lldb_private::UUID &uuid);
153 
154  void SetName(const char *);
155 
156  std::string GetName() const;
157 
158  void SetModule(lldb::ModuleSP module);
159 
160  lldb::ModuleSP GetModule();
161 
162  // try to fill in m_memory_module_sp from memory based on the m_load_address
164 
165  bool IsKernel()
166  const; // true if this is the mach_kernel; false if this is a kext
167 
168  void SetIsKernel(bool is_kernel);
169 
170  uint64_t GetSize() const;
171 
172  void SetSize(uint64_t size);
173 
174  uint32_t
175  GetProcessStopId() const; // the stop-id when this binary was first noticed
176 
177  void SetProcessStopId(uint32_t stop_id);
178 
179  bool operator==(const KextImageInfo &rhs);
180 
181  uint32_t GetAddressByteSize(); // as determined by Mach-O header
182 
183  lldb::ByteOrder GetByteOrder(); // as determined by Mach-O header
184 
186  GetArchitecture() const; // as determined by Mach-O header
187 
188  void PutToLog(lldb_private::Log *log) const;
189 
190  typedef std::vector<KextImageInfo> collection;
191  typedef collection::iterator iterator;
192  typedef collection::const_iterator const_iterator;
193 
194  private:
196  lldb::ModuleSP m_module_sp;
197  lldb::ModuleSP m_memory_module_sp;
199  UINT32_MAX; // the stop-id when this module was added
200  // to the Target
202  m_uuid; // UUID for this dylib if it has one, else all zeros
204  uint64_t m_size = 0;
206  false; // true if this is the kernel, false if this is a kext
207  };
208 
214 
215  OSKextLoadedKextSummaryHeader() = default;
216 
218  switch (version) {
219  case 0:
220  return 0; // Can't know the size without a valid version
221  case 1:
222  return 8; // Version 1 only had a version + entry_count
223  default:
224  break;
225  }
226  // Version 2 and above has version, entry_size, entry_count, and reserved
227  return 16;
228  }
229 
230  void Clear() {
231  version = 0;
232  entry_size = 0;
233  entry_count = 0;
235  }
236 
237  bool IsValid() const { return version >= 1 && version <= 2; }
238  };
239 
241 
243 
245 
246  bool ReadAllKextSummaries();
247 
248  bool ReadKextSummaryHeader();
249 
250  bool ParseKextSummaries(const lldb_private::Address &kext_summary_addr,
251  uint32_t count);
252 
253  void
255  uint32_t infos_count,
256  bool update_executable);
257 
258  uint32_t ReadKextSummaries(const lldb_private::Address &kext_summary_addr,
259  uint32_t image_infos_count,
260  KextImageInfo::collection &image_infos);
261 
262  static lldb::addr_t
264 
265  static lldb::addr_t
267 
269 
270  static lldb::addr_t
272 
273  static bool
274  ReadMachHeader(lldb::addr_t addr, lldb_private::Process *process, llvm::MachO::mach_header &mh,
275  bool *read_error = nullptr);
276 
277  static lldb_private::UUID
279  lldb_private::Process *process,
280  bool *read_error = nullptr);
281 
283  KextImageInfo m_kernel; // Info about the current kernel image being used
284 
289  mutable std::recursive_mutex m_mutex;
291 
292 private:
295  operator=(const DynamicLoaderDarwinKernel &) = delete;
296 };
297 
298 #endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
DynamicLoaderDarwinKernel::KextImageInfo::collection
std::vector< KextImageInfo > collection
Definition: DynamicLoaderDarwinKernel.h:190
lldb_private::UUID
Definition: UUID.h:23
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader
Definition: DynamicLoaderDarwinKernel.h:209
DynamicLoaderDarwinKernel::KextImageInfo::SetModule
void SetModule(lldb::ModuleSP module)
Definition: DynamicLoaderDarwinKernel.cpp:575
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition: StoppointCallbackContext.h:26
DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints
static lldb::addr_t SearchForKernelWithDebugHints(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:238
DynamicLoaderDarwinKernel::KextImageInfo::GetProcessStopId
uint32_t GetProcessStopId() const
Definition: DynamicLoaderDarwinKernel.cpp:608
DynamicLoaderDarwinKernel::KextImageInfo::PutToLog
void PutToLog(lldb_private::Log *log) const
Definition: DynamicLoaderDarwinKernel.cpp:1424
DynamicLoaderDarwinKernel::DebuggerInitialize
static void DebuggerInitialize(lldb_private::Debugger &debugger)
Definition: DynamicLoaderDarwinKernel.cpp:1542
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::entry_size
uint32_t entry_size
Definition: DynamicLoaderDarwinKernel.h:211
DynamicLoaderDarwinKernel::KextImageInfo::m_kernel_image
bool m_kernel_image
Definition: DynamicLoaderDarwinKernel.h:205
DynamicLoaderDarwinKernel::m_kext_summary_header
OSKextLoadedKextSummaryHeader m_kext_summary_header
Definition: DynamicLoaderDarwinKernel.h:287
DynamicLoaderDarwinKernel::m_mutex
std::recursive_mutex m_mutex
Definition: DynamicLoaderDarwinKernel.h:289
DynamicLoaderDarwinKernel::m_kernel_load_address
lldb::addr_t m_kernel_load_address
Definition: DynamicLoaderDarwinKernel.h:282
UUID.h
DynamicLoaderDarwinKernel::KextImageInfo::m_name
std::string m_name
Definition: DynamicLoaderDarwinKernel.h:195
DynamicLoaderDarwinKernel::operator=
const DynamicLoaderDarwinKernel & operator=(const DynamicLoaderDarwinKernel &)=delete
DynamicLoaderDarwinKernel::KextImageInfo::GetUUID
lldb_private::UUID GetUUID() const
Definition: DynamicLoaderDarwinKernel.cpp:638
DynamicLoaderDarwinKernel::m_kernel
KextImageInfo m_kernel
Definition: DynamicLoaderDarwinKernel.h:283
DynamicLoaderDarwinKernel::KextImageInfo::GetModule
lldb::ModuleSP GetModule()
Definition: DynamicLoaderDarwinKernel.cpp:587
DynamicLoaderDarwinKernel::KextImageInfo::m_load_address
lldb::addr_t m_load_address
Definition: DynamicLoaderDarwinKernel.h:203
lldb_private::Process
Definition: Process.h:338
DynamicLoaderDarwinKernel::SearchForDarwinKernel
static lldb::addr_t SearchForDarwinKernel(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:189
DynamicLoaderDarwinKernel::m_known_kexts
KextImageInfo::collection m_known_kexts
Definition: DynamicLoaderDarwinKernel.h:288
DynamicLoaderDarwinKernel::KextImageInfo::SetName
void SetName(const char *)
Definition: DynamicLoaderDarwinKernel.cpp:626
DynamicLoaderDarwinKernel::KextImageInfo::iterator
collection::iterator iterator
Definition: DynamicLoaderDarwinKernel.h:191
DynamicLoaderDarwinKernel::RegisterNotificationCallbacks
void RegisterNotificationCallbacks()
DynamicLoaderDarwinKernel::PrivateProcessStateChanged
void PrivateProcessStateChanged(lldb_private::Process *process, lldb::StateType state)
Definition: DynamicLoaderDarwinKernel.cpp:1489
DynamicLoaderDarwinKernel::KextImageInfo::m_memory_module_sp
lldb::ModuleSP m_memory_module_sp
Definition: DynamicLoaderDarwinKernel.h:197
DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr
static lldb::addr_t SearchForKernelAtSameLoadAddr(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:210
DynamicLoaderDarwinKernel::KextImageInfo::GetSize
uint64_t GetSize() const
Definition: DynamicLoaderDarwinKernel.cpp:600
DynamicLoaderDarwinKernel::ParseKextSummaries
bool ParseKextSummaries(const lldb_private::Address &kext_summary_addr, uint32_t count)
Definition: DynamicLoaderDarwinKernel.cpp:1161
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
DynamicLoaderDarwinKernel::Clear
void Clear(bool clear_process)
Definition: DynamicLoaderDarwinKernel.cpp:547
DynamicLoaderDarwinKernel::CreateInstance
static lldb_private::DynamicLoader * CreateInstance(lldb_private::Process *process, bool force)
Definition: DynamicLoaderDarwinKernel.cpp:136
Process.h
DynamicLoaderDarwinKernel::KextImageInfo::IsKernel
bool IsKernel() const
Definition: DynamicLoaderDarwinKernel.cpp:742
DynamicLoaderDarwinKernel::KextImageInfo::GetArchitecture
lldb_private::ArchSpec GetArchitecture() const
Definition: DynamicLoaderDarwinKernel.cpp:969
SafeMachO.h
DynamicLoaderDarwinKernel::UpdateIfNeeded
void UpdateIfNeeded()
Definition: DynamicLoaderDarwinKernel.cpp:524
DynamicLoaderDarwinKernel::KextImageInfo::IsLoaded
bool IsLoaded()
Definition: DynamicLoaderDarwinKernel.h:142
DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel
DynamicLoaderDarwinKernel(lldb_private::Process *process, lldb::addr_t kernel_addr)
Definition: DynamicLoaderDarwinKernel.cpp:507
DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule
bool LoadImageUsingMemoryModule(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:750
lldb_private::Thread
Definition: Thread.h:61
DynamicLoaderDarwinKernel::GetPluginName
llvm::StringRef GetPluginName() override
Definition: DynamicLoaderDarwinKernel.h:61
DynamicLoaderDarwinKernel::KextImageInfo::m_size
uint64_t m_size
Definition: DynamicLoaderDarwinKernel.h:204
DynamicLoaderDarwinKernel::BreakpointHitCallback
static bool BreakpointHitCallback(void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition: DynamicLoaderDarwinKernel.cpp:1058
DynamicLoaderDarwinKernel
Definition: DynamicLoaderDarwinKernel.h:24
DynamicLoaderDarwinKernel::CanLoadImage
lldb_private::Status CanLoadImage() override
Ask if it is ok to try and load or unload an shared library (image).
Definition: DynamicLoaderDarwinKernel.cpp:1525
DynamicLoaderDarwinKernel::~DynamicLoaderDarwinKernel
~DynamicLoaderDarwinKernel() override
Definition: DynamicLoaderDarwinKernel.cpp:522
DynamicLoaderDarwinKernel::KextImageInfo::const_iterator
collection::const_iterator const_iterator
Definition: DynamicLoaderDarwinKernel.h:192
DynamicLoaderDarwinKernel::KextImageInfo
Definition: DynamicLoaderDarwinKernel.h:124
DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule
bool ReadMemoryModule(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:648
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::version
uint32_t version
Definition: DynamicLoaderDarwinKernel.h:210
DynamicLoaderDarwinKernel::GetStepThroughTrampolinePlan
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread, bool stop_others) override
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
Definition: DynamicLoaderDarwinKernel.cpp:1517
lldb_private::DynamicLoader
Definition: DynamicLoader.h:52
DynamicLoaderDarwinKernel::KextImageInfo::GetName
std::string GetName() const
Definition: DynamicLoaderDarwinKernel.cpp:630
DynamicLoaderDarwinKernel::KextImageInfo::LoadImageAtFileAddress
bool LoadImageAtFileAddress(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:562
DynamicLoaderDarwinKernel::PrivateInitialize
void PrivateInitialize(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:1457
lldb_private::Debugger
Definition: Debugger.h:74
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::OSKextLoadedKextSummaryHeader
OSKextLoadedKextSummaryHeader()=default
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
DynamicLoaderDarwinKernel::KextImageInfo::SetLoadAddress
void SetLoadAddress(lldb::addr_t load_addr)
Definition: DynamicLoaderDarwinKernel.cpp:591
DynamicLoaderDarwinKernel::KextImageInfo::m_uuid
lldb_private::UUID m_uuid
Definition: DynamicLoaderDarwinKernel.h:202
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::entry_count
uint32_t entry_count
Definition: DynamicLoaderDarwinKernel.h:212
DynamicLoaderDarwinKernel::KextImageInfo::SetUUID
void SetUUID(const lldb_private::UUID &uuid)
Definition: DynamicLoaderDarwinKernel.cpp:634
DynamicLoaderDarwinKernel::ReadMachHeader
static bool ReadMachHeader(lldb::addr_t addr, lldb_private::Process *process, llvm::MachO::mach_header &mh, bool *read_error=nullptr)
Definition: DynamicLoaderDarwinKernel.cpp:392
DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded
void SetNotificationBreakpointIfNeeded()
Definition: DynamicLoaderDarwinKernel.cpp:1464
DynamicLoaderDarwinKernel::GetByteOrderFromMagic
static lldb::ByteOrder GetByteOrderFromMagic(uint32_t magic)
Definition: DynamicLoaderDarwinKernel.cpp:1560
DynamicLoaderDarwinKernel::KextImageInfo::SetProcessStopId
void SetProcessStopId(uint32_t stop_id)
Definition: DynamicLoaderDarwinKernel.cpp:612
DynamicLoaderDarwinKernel::ReadKextSummaries
uint32_t ReadKextSummaries(const lldb_private::Address &kext_summary_addr, uint32_t image_infos_count, KextImageInfo::collection &image_infos)
Definition: DynamicLoaderDarwinKernel.cpp:1362
lldb_private::UUID::Clear
void Clear()
Definition: UUID.h:72
DynamicLoaderDarwinKernel::KextImageInfo::SetIsKernel
void SetIsKernel(bool is_kernel)
Definition: DynamicLoaderDarwinKernel.cpp:746
DynamicLoaderDarwinKernel::KextImageInfo::Clear
void Clear()
Definition: DynamicLoaderDarwinKernel.h:128
DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress
static lldb_private::UUID CheckForKernelImageAtAddress(lldb::addr_t addr, lldb_private::Process *process, bool *read_error=nullptr)
Definition: DynamicLoaderDarwinKernel.cpp:435
DynamicLoaderDarwinKernel::KextImageInfo::SetSize
void SetSize(uint64_t size)
Definition: DynamicLoaderDarwinKernel.cpp:604
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::IsValid
bool IsValid() const
Definition: DynamicLoaderDarwinKernel.h:237
lldb_private::Status
Definition: Status.h:44
DynamicLoaderDarwinKernel::KERNEL_MODULE_MAX_NAME
@ KERNEL_MODULE_MAX_NAME
Definition: DynamicLoaderDarwinKernel.h:89
DynamicLoaderDarwinKernel::Terminate
static void Terminate()
Definition: DynamicLoaderDarwinKernel.cpp:1538
uint32_t
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::GetSize
uint32_t GetSize()
Definition: DynamicLoaderDarwinKernel.h:217
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::image_infos_addr
lldb::addr_t image_infos_addr
Definition: DynamicLoaderDarwinKernel.h:213
DynamicLoaderDarwinKernel::KextImageInfo::KextImageInfo
KextImageInfo()
Definition: DynamicLoaderDarwinKernel.h:126
DynamicLoaderDarwinKernel::BreakpointHit
bool BreakpointHit(lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition: DynamicLoaderDarwinKernel.cpp:1065
DynamicLoaderDarwinKernel::UpdateImageInfosHeaderAndLoadCommands
void UpdateImageInfosHeaderAndLoadCommands(KextImageInfo::collection &image_infos, uint32_t infos_count, bool update_executable)
lldb_private::Address
Definition: Address.h:59
DynamicLoaderDarwinKernel::KextImageInfo::m_module_sp
lldb::ModuleSP m_module_sp
Definition: DynamicLoaderDarwinKernel.h:196
DynamicLoaderDarwinKernel::PutToLog
void PutToLog(lldb_private::Log *log) const
Definition: DynamicLoaderDarwinKernel.cpp:1436
DynamicLoaderDarwinKernel::ReadAllKextSummaries
bool ReadAllKextSummaries()
Definition: DynamicLoaderDarwinKernel.cpp:1405
DynamicLoaderDarwinKernel::m_kext_summary_header_ptr_addr
lldb_private::Address m_kext_summary_header_ptr_addr
Definition: DynamicLoaderDarwinKernel.h:285
DynamicLoaderDarwinKernel::ReadKextSummaryHeader
bool ReadKextSummaryHeader()
Definition: DynamicLoaderDarwinKernel.cpp:1079
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
DynamicLoaderDarwinKernel::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: DynamicLoaderDarwinKernel.h:36
DynamicLoaderDarwinKernel::KextImageInfo::m_load_process_stop_id
uint32_t m_load_process_stop_id
Definition: DynamicLoaderDarwinKernel.h:198
DynamicLoaderDarwinKernel::m_kext_summary_header_addr
lldb_private::Address m_kext_summary_header_addr
Definition: DynamicLoaderDarwinKernel.h:286
DynamicLoaderDarwinKernel::SearchForKernelNearPC
static lldb::addr_t SearchForKernelNearPC(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:290
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:74
DynamicLoaderDarwinKernel::KextImageInfo::operator==
bool operator==(const KextImageInfo &rhs)
Definition: DynamicLoaderDarwinKernel.cpp:618
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
DynamicLoaderDarwinKernel::KextImageInfo::GetAddressByteSize
uint32_t GetAddressByteSize()
Definition: DynamicLoaderDarwinKernel.cpp:952
DynamicLoaderDarwinKernel::Initialize
static void Initialize()
Definition: DynamicLoaderDarwinKernel.cpp:1532
FileSpec.h
DynamicLoaderDarwinKernel::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: DynamicLoaderDarwinKernel.cpp:1554
DynamicLoaderDarwinKernel::DidAttach
void DidAttach() override
Called after attaching a process.
Definition: DynamicLoaderDarwinKernel.cpp:532
DynamicLoaderDarwinKernel::UnregisterNotificationCallbacks
void UnregisterNotificationCallbacks()
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::Log
Definition: Log.h:115
DynamicLoader.h
DynamicLoaderDarwinKernel::OSKextLoadedKextSummaryHeader::Clear
void Clear()
Definition: DynamicLoaderDarwinKernel.h:230
DynamicLoaderDarwinKernel::GetAddrByteSize
uint32_t GetAddrByteSize()
Definition: DynamicLoaderDarwinKernel.h:84
DynamicLoaderDarwinKernel::DidLaunch
void DidLaunch() override
Called after attaching a process.
Definition: DynamicLoaderDarwinKernel.cpp:541
DynamicLoaderDarwinKernel::KERNEL_MODULE_ENTRY_SIZE_VERSION_1
@ KERNEL_MODULE_ENTRY_SIZE_VERSION_1
Definition: DynamicLoaderDarwinKernel.h:94
DynamicLoaderDarwinKernel::KextImageInfo::GetByteOrder
lldb::ByteOrder GetByteOrder()
Definition: DynamicLoaderDarwinKernel.cpp:960
DynamicLoaderDarwinKernel::KextImageInfo::GetLoadAddress
lldb::addr_t GetLoadAddress() const
Definition: DynamicLoaderDarwinKernel.cpp:596
DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded
void LoadKernelModuleIfNeeded()
Definition: DynamicLoaderDarwinKernel.cpp:980
DynamicLoaderDarwinKernel::m_break_id
lldb::user_id_t m_break_id
Definition: DynamicLoaderDarwinKernel.h:290
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition: lldb-enumerations.h:138
DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch
static lldb::addr_t SearchForKernelViaExhaustiveSearch(lldb_private::Process *process)
Definition: DynamicLoaderDarwinKernel.cpp:347