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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 1 05:17:42 PST 2020


labath added a comment.

In D92187#2425301 <https://reviews.llvm.org/D92187#2425301>, @mgorny wrote:

> I've added some more debug as requested, and it confirmed that Linux and FreeBSD dyld are behaving differently here.
>
> Linux triggers the breakpoint twice: first time in `add` state, including only `/lib64/ld-linux-x86-64.so.2` and `linux-vdso.so.1` in module list, and the second time in `consistent` state, adding soentries for all shared libraries.
>
> FreeBSD triggers it only once, in `consistent` state and the remote list includes all libraries immediately

Thanks for investigating this. And I'm sorry for being so picky -- this is all very messy, and I am trying to understand things to avoid making an even bigger mess.

When you say "FreeBSD triggers it only once", which breakpoint are you referring to? The "rendezvous" breakpoint? Judging by the log's, I would say yes. But if that's true, then how does the "entry" breakpoint fit into this picture (IIUC, your change basically forces setting of the entry breakpoint on freebsd)? The question I'm looking to answer is whether we really need to set the entry breakpoint, or we just need some side-effect of what happens when we process that breakpoint hit (and we could achieve that differently).

I'm not saying that setting the entry breakpoint is a bad idea -- that mechanism seems more canonical than searching for some hardcoded symbol name -- but in order to decide that, we need to know what actually goes on in there...


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

https://reviews.llvm.org/D92187



More information about the lldb-commits mailing list