LLDB  mainline
DYLDRendezvous.cpp
Go to the documentation of this file.
1 //===-- DYLDRendezvous.cpp --------------------------------------*- 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 #include "lldb/Core/Module.h"
10 #include "lldb/Symbol/ObjectFile.h"
11 #include "lldb/Symbol/Symbol.h"
13 #include "lldb/Target/Platform.h"
14 #include "lldb/Target/Process.h"
15 #include "lldb/Target/Target.h"
16 #include "lldb/Utility/ArchSpec.h"
17 #include "lldb/Utility/Log.h"
18 #include "lldb/Utility/Status.h"
19 
20 #include "llvm/Support/Path.h"
21 
22 #include "DYLDRendezvous.h"
23 
24 using namespace lldb;
25 using namespace lldb_private;
26 
27 /// Locates the address of the rendezvous structure. Returns the address on
28 /// success and LLDB_INVALID_ADDRESS on failure.
31  addr_t info_location;
32  addr_t info_addr;
33  Status error;
34 
35  if (!process) {
36  if (log)
37  log->Printf("%s null process provided", __FUNCTION__);
38  return LLDB_INVALID_ADDRESS;
39  }
40 
41  // Try to get it from our process. This might be a remote process and might
42  // grab it via some remote-specific mechanism.
43  info_location = process->GetImageInfoAddress();
44  if (log)
45  log->Printf("%s info_location = 0x%" PRIx64, __FUNCTION__, info_location);
46 
47  // If the process fails to return an address, fall back to seeing if the
48  // local object file can help us find it.
49  if (info_location == LLDB_INVALID_ADDRESS) {
50  Target *target = &process->GetTarget();
51  if (target) {
52  ObjectFile *obj_file = target->GetExecutableModule()->GetObjectFile();
53  Address addr = obj_file->GetImageInfoAddress(target);
54 
55  if (addr.IsValid()) {
56  info_location = addr.GetLoadAddress(target);
57  if (log)
58  log->Printf(
59  "%s resolved via direct object file approach to 0x%" PRIx64,
60  __FUNCTION__, info_location);
61  } else {
62  if (log)
63  log->Printf("%s FAILED - direct object file approach did not yield a "
64  "valid address",
65  __FUNCTION__);
66  }
67  }
68  }
69 
70  if (info_location == LLDB_INVALID_ADDRESS) {
71  if (log)
72  log->Printf("%s FAILED - invalid info address", __FUNCTION__);
73  return LLDB_INVALID_ADDRESS;
74  }
75 
76  if (log)
77  log->Printf("%s reading pointer (%" PRIu32 " bytes) from 0x%" PRIx64,
78  __FUNCTION__, process->GetAddressByteSize(), info_location);
79 
80  info_addr = process->ReadPointerFromMemory(info_location, error);
81  if (error.Fail()) {
82  if (log)
83  log->Printf("%s FAILED - could not read from the info location: %s",
84  __FUNCTION__, error.AsCString());
85  return LLDB_INVALID_ADDRESS;
86  }
87 
88  if (info_addr == 0) {
89  if (log)
90  log->Printf("%s FAILED - the rendezvous address contained at 0x%" PRIx64
91  " returned a null value",
92  __FUNCTION__, info_location);
93  return LLDB_INVALID_ADDRESS;
94  }
95 
96  return info_addr;
97 }
98 
100  : m_process(process), m_rendezvous_addr(LLDB_INVALID_ADDRESS), m_current(),
101  m_previous(), m_loaded_modules(), m_soentries(), m_added_soentries(),
102  m_removed_soentries() {
104 
105  m_thread_info.valid = false;
106 
107  // Cache a copy of the executable path
108  if (m_process) {
110  if (exe_mod) {
112  if (log)
113  log->Printf("DYLDRendezvous::%s exe module executable path set: '%s'",
114  __FUNCTION__, m_exe_file_spec.GetCString());
115  } else {
116  if (log)
117  log->Printf("DYLDRendezvous::%s cannot cache exe module path: null "
118  "executable module pointer",
119  __FUNCTION__);
120  }
121  }
122 }
123 
126 
127  const size_t word_size = 4;
128  Rendezvous info;
129  size_t address_size;
130  size_t padding;
131  addr_t info_addr;
132  addr_t cursor;
133 
134  address_size = m_process->GetAddressByteSize();
135  padding = address_size - word_size;
136  if (log)
137  log->Printf("DYLDRendezvous::%s address size: %" PRIu64
138  ", padding %" PRIu64,
139  __FUNCTION__, uint64_t(address_size), uint64_t(padding));
140 
142  cursor = info_addr = ResolveRendezvousAddress(m_process);
143  else
144  cursor = info_addr = m_rendezvous_addr;
145  if (log)
146  log->Printf("DYLDRendezvous::%s cursor = 0x%" PRIx64, __FUNCTION__, cursor);
147 
148  if (cursor == LLDB_INVALID_ADDRESS)
149  return false;
150 
151  if (!(cursor = ReadWord(cursor, &info.version, word_size)))
152  return false;
153 
154  if (!(cursor = ReadPointer(cursor + padding, &info.map_addr)))
155  return false;
156 
157  if (!(cursor = ReadPointer(cursor, &info.brk)))
158  return false;
159 
160  if (!(cursor = ReadWord(cursor, &info.state, word_size)))
161  return false;
162 
163  if (!(cursor = ReadPointer(cursor + padding, &info.ldbase)))
164  return false;
165 
166  // The rendezvous was successfully read. Update our internal state.
167  m_rendezvous_addr = info_addr;
169  m_current = info;
170 
171  if (UpdateSOEntries(true))
172  return true;
173 
174  return UpdateSOEntries();
175 }
176 
179 }
180 
181 bool DYLDRendezvous::UpdateSOEntries(bool fromRemote) {
182  SOEntry entry;
183  LoadedModuleInfoList module_list;
184 
185  // If we can't get the SO info from the remote, return failure.
186  if (fromRemote && m_process->LoadModules(module_list) == 0)
187  return false;
188 
189  if (!fromRemote && m_current.map_addr == 0)
190  return false;
191 
192  // When the previous and current states are consistent this is the first time
193  // we have been asked to update. Just take a snapshot of the currently
194  // loaded modules.
195  if (m_previous.state == eConsistent && m_current.state == eConsistent)
196  return fromRemote ? SaveSOEntriesFromRemote(module_list)
198 
199  // If we are about to add or remove a shared object clear out the current
200  // state and take a snapshot of the currently loaded images.
201  if (m_current.state == eAdd || m_current.state == eDelete) {
202  // Some versions of the android dynamic linker might send two notifications
203  // with state == eAdd back to back. Ignore them until we get an eConsistent
204  // notification.
205  if (!(m_previous.state == eConsistent ||
206  (m_previous.state == eAdd && m_current.state == eDelete)))
207  return false;
208 
209  m_soentries.clear();
210  if (fromRemote)
211  return SaveSOEntriesFromRemote(module_list);
212 
213  m_added_soentries.clear();
214  m_removed_soentries.clear();
215  return TakeSnapshot(m_soentries);
216  }
217  assert(m_current.state == eConsistent);
218 
219  // Otherwise check the previous state to determine what to expect and update
220  // accordingly.
221  if (m_previous.state == eAdd)
222  return fromRemote ? AddSOEntriesFromRemote(module_list) : AddSOEntries();
223  else if (m_previous.state == eDelete)
224  return fromRemote ? RemoveSOEntriesFromRemote(module_list)
225  : RemoveSOEntries();
226 
227  return false;
228 }
229 
231  LoadedModuleInfoList::LoadedModuleInfo const &modInfo, SOEntry &entry) {
232  addr_t link_map_addr;
233  addr_t base_addr;
234  addr_t dyn_addr;
235  std::string name;
236 
237  if (!modInfo.get_link_map(link_map_addr) || !modInfo.get_base(base_addr) ||
238  !modInfo.get_dynamic(dyn_addr) || !modInfo.get_name(name))
239  return false;
240 
241  entry.link_addr = link_map_addr;
242  entry.base_addr = base_addr;
243  entry.dyn_addr = dyn_addr;
244 
245  entry.file_spec.SetFile(name, FileSpec::Style::native);
246 
247  UpdateBaseAddrIfNecessary(entry, name);
248 
249  // not needed if we're using ModuleInfos
250  entry.next = 0;
251  entry.prev = 0;
252  entry.path_addr = 0;
253 
254  return true;
255 }
256 
258  LoadedModuleInfoList &module_list) {
259  for (auto const &modInfo : module_list.m_list) {
260  SOEntry entry;
261  if (!FillSOEntryFromModuleInfo(modInfo, entry))
262  return false;
263 
264  // Only add shared libraries and not the executable.
265  if (!SOEntryIsMainExecutable(entry))
266  m_soentries.push_back(entry);
267  }
268 
269  m_loaded_modules = module_list;
270  return true;
271 }
272 
274  for (auto const &modInfo : module_list.m_list) {
275  bool found = false;
276  for (auto const &existing : m_loaded_modules.m_list) {
277  if (modInfo == existing) {
278  found = true;
279  break;
280  }
281  }
282 
283  if (found)
284  continue;
285 
286  SOEntry entry;
287  if (!FillSOEntryFromModuleInfo(modInfo, entry))
288  return false;
289 
290  // Only add shared libraries and not the executable.
291  if (!SOEntryIsMainExecutable(entry))
292  m_soentries.push_back(entry);
293  }
294 
295  m_loaded_modules = module_list;
296  return true;
297 }
298 
300  LoadedModuleInfoList &module_list) {
301  for (auto const &existing : m_loaded_modules.m_list) {
302  bool found = false;
303  for (auto const &modInfo : module_list.m_list) {
304  if (modInfo == existing) {
305  found = true;
306  break;
307  }
308  }
309 
310  if (found)
311  continue;
312 
313  SOEntry entry;
314  if (!FillSOEntryFromModuleInfo(existing, entry))
315  return false;
316 
317  // Only add shared libraries and not the executable.
318  if (!SOEntryIsMainExecutable(entry)) {
319  auto pos = std::find(m_soentries.begin(), m_soentries.end(), entry);
320  if (pos == m_soentries.end())
321  return false;
322 
323  m_soentries.erase(pos);
324  }
325  }
326 
327  m_loaded_modules = module_list;
328  return true;
329 }
330 
332  SOEntry entry;
333  iterator pos;
334 
335  assert(m_previous.state == eAdd);
336 
337  if (m_current.map_addr == 0)
338  return false;
339 
340  for (addr_t cursor = m_current.map_addr; cursor != 0; cursor = entry.next) {
341  if (!ReadSOEntryFromMemory(cursor, entry))
342  return false;
343 
344  // Only add shared libraries and not the executable.
345  if (SOEntryIsMainExecutable(entry))
346  continue;
347 
348  pos = std::find(m_soentries.begin(), m_soentries.end(), entry);
349  if (pos == m_soentries.end()) {
350  m_soentries.push_back(entry);
351  m_added_soentries.push_back(entry);
352  }
353  }
354 
355  return true;
356 }
357 
359  SOEntryList entry_list;
360  iterator pos;
361 
362  assert(m_previous.state == eDelete);
363 
364  if (!TakeSnapshot(entry_list))
365  return false;
366 
367  for (iterator I = begin(); I != end(); ++I) {
368  pos = std::find(entry_list.begin(), entry_list.end(), *I);
369  if (pos == entry_list.end())
370  m_removed_soentries.push_back(*I);
371  }
372 
373  m_soentries = entry_list;
374  return true;
375 }
376 
378  // On some systes the executable is indicated by an empty path in the entry.
379  // On others it is the full path to the executable.
380 
381  auto triple = m_process->GetTarget().GetArchitecture().GetTriple();
382  switch (triple.getOS()) {
383  case llvm::Triple::FreeBSD:
384  case llvm::Triple::NetBSD:
385  return entry.file_spec == m_exe_file_spec;
386  case llvm::Triple::Linux:
387  if (triple.isAndroid())
388  return entry.file_spec == m_exe_file_spec;
389  return !entry.file_spec;
390  default:
391  return false;
392  }
393 }
394 
396  SOEntry entry;
397 
398  if (m_current.map_addr == 0)
399  return false;
400 
401  // Clear previous entries since we are about to obtain an up to date list.
402  entry_list.clear();
403 
404  for (addr_t cursor = m_current.map_addr; cursor != 0; cursor = entry.next) {
405  if (!ReadSOEntryFromMemory(cursor, entry))
406  return false;
407 
408  // Only add shared libraries and not the executable.
409  if (SOEntryIsMainExecutable(entry))
410  continue;
411 
412  entry_list.push_back(entry);
413  }
414 
415  return true;
416 }
417 
418 addr_t DYLDRendezvous::ReadWord(addr_t addr, uint64_t *dst, size_t size) {
419  Status error;
420 
421  *dst = m_process->ReadUnsignedIntegerFromMemory(addr, size, 0, error);
422  if (error.Fail())
423  return 0;
424 
425  return addr + size;
426 }
427 
429  Status error;
430 
431  *dst = m_process->ReadPointerFromMemory(addr, error);
432  if (error.Fail())
433  return 0;
434 
435  return addr + m_process->GetAddressByteSize();
436 }
437 
439  std::string str;
440  Status error;
441 
442  if (addr == LLDB_INVALID_ADDRESS)
443  return std::string();
444 
445  m_process->ReadCStringFromMemory(addr, str, error);
446 
447  return str;
448 }
449 
450 // Returns true if the load bias reported by the linker is incorrect for the
451 // given entry. This function is used to handle cases where we want to work
452 // around a bug in the system linker.
453 static bool isLoadBiasIncorrect(Target &target, const std::string &file_path) {
454  // On Android L (API 21, 22) the load address of the "/system/bin/linker"
455  // isn't filled in correctly.
456  unsigned os_major = target.GetPlatform()->GetOSVersion().getMajor();
457  return target.GetArchitecture().GetTriple().isAndroid() &&
458  (os_major == 21 || os_major == 22) &&
459  (file_path == "/system/bin/linker" ||
460  file_path == "/system/bin/linker64");
461 }
462 
464  std::string const &file_path) {
465  // If the load bias reported by the linker is incorrect then fetch the load
466  // address of the file from the proc file system.
467  if (isLoadBiasIncorrect(m_process->GetTarget(), file_path)) {
469  bool is_loaded = false;
470  Status error =
471  m_process->GetFileLoadAddress(entry.file_spec, is_loaded, load_addr);
472  if (error.Success() && is_loaded)
473  entry.base_addr = load_addr;
474  }
475 }
476 
478  entry.clear();
479 
480  entry.link_addr = addr;
481 
482  if (!(addr = ReadPointer(addr, &entry.base_addr)))
483  return false;
484 
485  // mips adds an extra load offset field to the link map struct on FreeBSD and
486  // NetBSD (need to validate other OSes).
487  // http://svnweb.freebsd.org/base/head/sys/sys/link_elf.h?revision=217153&view=markup#l57
488  const ArchSpec &arch = m_process->GetTarget().GetArchitecture();
489  if ((arch.GetTriple().getOS() == llvm::Triple::FreeBSD ||
490  arch.GetTriple().getOS() == llvm::Triple::NetBSD) &&
491  (arch.GetMachine() == llvm::Triple::mips ||
492  arch.GetMachine() == llvm::Triple::mipsel ||
493  arch.GetMachine() == llvm::Triple::mips64 ||
494  arch.GetMachine() == llvm::Triple::mips64el)) {
495  addr_t mips_l_offs;
496  if (!(addr = ReadPointer(addr, &mips_l_offs)))
497  return false;
498  if (mips_l_offs != 0 && mips_l_offs != entry.base_addr)
499  return false;
500  }
501 
502  if (!(addr = ReadPointer(addr, &entry.path_addr)))
503  return false;
504 
505  if (!(addr = ReadPointer(addr, &entry.dyn_addr)))
506  return false;
507 
508  if (!(addr = ReadPointer(addr, &entry.next)))
509  return false;
510 
511  if (!(addr = ReadPointer(addr, &entry.prev)))
512  return false;
513 
514  std::string file_path = ReadStringFromMemory(entry.path_addr);
515  entry.file_spec.SetFile(file_path, FileSpec::Style::native);
516 
517  UpdateBaseAddrIfNecessary(entry, file_path);
518 
519  return true;
520 }
521 
522 bool DYLDRendezvous::FindMetadata(const char *name, PThreadField field,
523  uint32_t &value) {
524  Target &target = m_process->GetTarget();
525 
526  SymbolContextList list;
528  eSymbolTypeAny, list))
529  return false;
530 
531  Address address = list[0].symbol->GetAddress();
532  addr_t addr = address.GetLoadAddress(&target);
533  if (addr == LLDB_INVALID_ADDRESS)
534  return false;
535 
536  Status error;
538  addr + field * sizeof(uint32_t), sizeof(uint32_t), 0, error);
539  if (error.Fail())
540  return false;
541 
542  if (field == eSize)
543  value /= 8; // convert bits to bytes
544 
545  return true;
546 }
547 
549  if (!m_thread_info.valid) {
550  bool ok = true;
551 
552  ok &= FindMetadata("_thread_db_pthread_dtvp", eOffset,
554  ok &=
555  FindMetadata("_thread_db_dtv_dtv", eSize, m_thread_info.dtv_slot_size);
556  ok &= FindMetadata("_thread_db_link_map_l_tls_modid", eOffset,
558  ok &= FindMetadata("_thread_db_dtv_t_pointer_val", eOffset,
560 
561  if (ok)
562  m_thread_info.valid = true;
563  }
564 
565  return m_thread_info;
566 }
567 
568 void DYLDRendezvous::DumpToLog(Log *log) const {
569  int state = GetState();
570 
571  if (!log)
572  return;
573 
574  log->PutCString("DYLDRendezvous:");
575  log->Printf(" Address: %" PRIx64, GetRendezvousAddress());
576  log->Printf(" Version: %" PRIu64, GetVersion());
577  log->Printf(" Link : %" PRIx64, GetLinkMapAddress());
578  log->Printf(" Break : %" PRIx64, GetBreakAddress());
579  log->Printf(" LDBase : %" PRIx64, GetLDBase());
580  log->Printf(" State : %s",
581  (state == eConsistent)
582  ? "consistent"
583  : (state == eAdd) ? "add" : (state == eDelete) ? "delete"
584  : "unknown");
585 
586  iterator I = begin();
587  iterator E = end();
588 
589  if (I != E)
590  log->PutCString("DYLDRendezvous SOEntries:");
591 
592  for (int i = 1; I != E; ++I, ++i) {
593  log->Printf("\n SOEntry [%d] %s", i, I->file_spec.GetCString());
594  log->Printf(" Base : %" PRIx64, I->base_addr);
595  log->Printf(" Path : %" PRIx64, I->path_addr);
596  log->Printf(" Dyn : %" PRIx64, I->dyn_addr);
597  log->Printf(" Next : %" PRIx64, I->next);
598  log->Printf(" Prev : %" PRIx64, I->prev);
599  }
600 }
bool SOEntryIsMainExecutable(const SOEntry &entry)
virtual Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded, lldb::addr_t &load_addr)
Try to find the load address of a file.
Definition: Process.h:2313
std::string ReadStringFromMemory(lldb::addr_t addr)
Reads a null-terminated C string from the memory location starting at addr.
virtual lldb_private::Address GetImageInfoAddress(Target *target)
Similar to Process::GetImageInfoAddress().
Definition: ObjectFile.h:458
Defines a list of symbol context objects.
Rendezvous m_current
Current and previous snapshots of the rendezvous structure.
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
lldb_private::Process * m_process
const ArchSpec & GetArchitecture() const
Definition: Target.h:941
SOEntryList m_soentries
List of SOEntry objects corresponding to the current link map state.
bool ReadSOEntryFromMemory(lldb::addr_t addr, SOEntry &entry)
Reads an SOEntry starting at addr.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
Definition: Address.cpp:292
lldb::addr_t dyn_addr
Dynamic section of shared object.
lldb::addr_t path_addr
String naming the shared object.
ThreadInfo m_thread_info
Threading metadata read from the inferior.
lldb_private::FileSpec m_exe_file_spec
bool FillSOEntryFromModuleInfo(LoadedModuleInfoList::LoadedModuleInfo const &modInfo, SOEntry &entry)
bool FindMetadata(const char *name, PThreadField field, uint32_t &value)
lldb::addr_t GetBreakAddress() const
A breakpoint should be set at this address and Resolve called on each hit.
An architecture specification class.
Definition: ArchSpec.h:32
size_t ReadCStringFromMemory(lldb::addr_t vm_addr, char *cstr, size_t cstr_max_len, Status &error)
Read a NULL terminated C string from memory.
Definition: Process.cpp:2080
A plug-in interface definition class for object file parsers.
Definition: ObjectFile.h:58
Module * GetExecutableModulePointer()
Definition: Target.cpp:1394
bool RemoveSOEntriesFromRemote(LoadedModuleInfoList &module_list)
void DumpToLog(lldb_private::Log *log) const
bool UpdateSOEntries(bool fromRemote=false)
Updates the current set of SOEntries, the set of added entries, and the set of removed entries...
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition: ArchSpec.h:431
uint64_t GetState() const
Returns the current state of the rendezvous structure.
lldb::addr_t link_addr
Address of this link_map.
lldb::addr_t m_rendezvous_addr
Location of the r_debug structure in the inferiors address space.
std::list< SOEntry > SOEntryList
#define LLDB_INVALID_ADDRESS
Invalid value definitions.
Definition: lldb-defines.h:85
DYLDRendezvous(lldb_private::Process *process)
bool SaveSOEntriesFromRemote(LoadedModuleInfoList &module_list)
lldb_private::FileSpec file_spec
File spec of shared object.
A class that describes an executable image and its associated object and symbol files.
Definition: Module.h:109
size_t FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list, bool append=false) const
Definition: ModuleList.cpp:457
const ThreadInfo & GetThreadInfo()
uint32_t GetAddressByteSize() const
Definition: Process.cpp:3370
A plug-in interface definition class for debugging a process.
Definition: Process.h:353
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition: Target.cpp:1380
bool Resolve()
Update the internal snapshot of runtime linker rendezvous and recompute the currently loaded modules...
lldb::addr_t prev
Address of previous so_entry.
bool Success() const
Test for success condition.
Definition: Status.cpp:287
Rendezvous m_previous
virtual size_t LoadModules()
Sometimes processes know how to retrieve and load shared libraries.
Definition: Process.h:684
bool IsValid() const
Check if the object state is valid.
Definition: Address.h:343
A section + offset based address class.
Definition: Address.h:80
lldb::addr_t GetLinkMapAddress() const
iterator end() const
const char * GetCString(bool denormalize=true) const
Definition: FileSpec.cpp:392
lldb::addr_t GetRendezvousAddress() const
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition: Target.h:899
#define LIBLLDB_LOG_DYNAMIC_LOADER
Definition: Logging.h:17
lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status &error)
Definition: Process.cpp:2172
lldb::addr_t GetLDBase() const
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1194
SOEntryList m_added_soentries
List of SOEntry&#39;s added to the link map since the last call to Resolve().
uint64_t addr_t
Definition: lldb-types.h:83
lldb::addr_t next
Address of next so_entry.
lldb::PlatformSP GetPlatform()
Definition: Target.h:1214
A uniqued constant string class.
Definition: ConstString.h:38
const FileSpec & GetPlatformFileSpec() const
Get accessor for the module platform file specification.
Definition: Module.h:545
bool Fail() const
Test for error condition.
Definition: Status.cpp:181
void UpdateBaseAddrIfNecessary(SOEntry &entry, std::string const &file_path)
Structure representing the shared objects currently loaded into the inferior process.
void PutCString(const char *cstr)
Definition: Log.cpp:109
Log * GetLogIfAnyCategoriesSet(uint32_t mask)
Definition: Logging.cpp:61
Definition: SBAddress.h:15
bool AddSOEntriesFromRemote(LoadedModuleInfoList &module_list)
static bool isLoadBiasIncorrect(Target &target, const std::string &file_path)
SOEntryList::const_iterator iterator
static addr_t ResolveRendezvousAddress(Process *process)
Locates the address of the rendezvous structure.
SOEntryList m_removed_soentries
List of SOEntry&#39;s removed from the link map since the last call to Resolve().
bool TakeSnapshot(SOEntryList &entry_list)
Reads the current list of shared objects according to the link map supplied by the runtime linker...
uint64_t GetVersion() const
lldb::addr_t ReadWord(lldb::addr_t addr, uint64_t *dst, size_t size)
Reads an unsigned integer of size bytes from the inferior&#39;s address space starting at addr...
void SetFile(llvm::StringRef path, Style style)
Change the file specified with a new path.
Definition: FileSpec.cpp:198
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
Definition: Status.cpp:130
virtual lldb::addr_t GetImageInfoAddress()
Get the image information address for the current process.
Definition: Process.cpp:1539
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:2150
lldb::addr_t ReadPointer(lldb::addr_t addr, lldb::addr_t *dst)
Reads an address from the inferior&#39;s address space starting at addr.
void Printf(const char *format,...) __attribute__((format(printf
Definition: Log.cpp:113
iterator begin() const
Iterators over all currently loaded modules.
LoadedModuleInfoList m_loaded_modules
List of currently loaded SO modules.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
Definition: ArchSpec.cpp:726
lldb::addr_t base_addr
Base address of the loaded object.
std::vector< LoadedModuleInfo > m_list
An error handling class.
Definition: Status.h:44