[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 1 06:15:55 PST 2020


krytarowski added a comment.

Ideally we should iterate over the startup process and investigate the state of the `r_debug` structure. Once it gets initialized, set the software brakpoint to `r_brk` and keep track of the dynamic loading and unloading of libraries. The tricky part is to detect the right moment to plug into `r_brk`, early enough in the startup process before calling constructors, loading the libraries etc and late enough to become initialized.

Right now we place the breakpoints unconditionally, hardcoding the linker name, mostly ignoring the `r_brk`, but in practice it's not clear whether it's the simplest and sufficient approach.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92187/new/

https://reviews.llvm.org/D92187



More information about the lldb-commits mailing list