[Lldb-commits] [PATCH] D41533: Advanced guessing of rendezvous breakpoint
Eugene Zemtsov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 9 20:04:53 PST 2018
eugene marked 5 inline comments as done.
eugene added inline comments.
================
Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:365-368
+ static const char *DebugStateCandidates[] = {
+ "_dl_debug_state", "rtld_db_dlactivity", "__dl_rtld_db_dlactivity",
+ "r_debug_state", "_r_debug_state", "_rtld_debug_state",
+ };
----------------
clayborg wrote:
> Will only one of these ever be present?
Yes. These are the names of rendezvous functions in different known linkers (Android, Linux, BSD) None of them should have more than one function from this list.
================
Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:379
+ }
+ break_addr = symbol->GetLoadAddress(&m_process->GetTarget());
+ if (break_addr == LLDB_INVALID_ADDRESS) {
----------------
clayborg wrote:
> labath wrote:
> > It should be possible to create the breakpoint via `Target::CreateBreakpoint` (the overload that lets you specify a list of function names) instead of manually resolving the symbols... Have you tried doing that?
> Agreed, I would use the breakpoint setting function in target that allows you to specify one or more names as labath suggested. One question about this code though: how would we ever get a load address from a module if the dynamic loader doesn't load it itself? Are these symbols in the "[vdso]" module and is the [vdso]" module loaded differently?
OS loads the dynamic loader, if it is requested by the executable, and passes its base address via AT_BASE value in the auxiliary vector (https://refspecs.linuxfoundation.org/LSB_1.3.0/IA64/spec/auxiliaryvector.html). That's how we know where to look for it. (see EvalSpecialModulesStatus)
vdso is yet another special module, but it is not related to the dynamic loader.
https://reviews.llvm.org/D41533
More information about the lldb-commits
mailing list