https://llvm.org/bugs/show_bug.cgi?id=25806
Bug ID: 25806 Summary: Can't set breakpoint in static initializer Product: lldb Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: tbergham...@google.com CC: llvm-b...@lists.llvm.org Classification: Unclassified LLDB don't detect the loading of a shared object file linked against the main executable before the static initializers are executed for the given module. Because of this it is not possible to get breakpoint hits in these static initializers and to display proper debug info in case of a crash in these codes. (The issue isn't happening for dlopen-ed libraries.) The issue is demonstrated in TestLoadUnlod.py LoadUnloadTestCase.test_static_init_during_load test case. My current understanding of the problem: The problem is that DynamicLoaderPOSIXDYLD first set a breakpoint on the entry of the main executable based on the content of auxv (it will be libc.so'_start) and then set the rendezvous breakpoint when the entry breakpoint is hit. The static initializers are running before libc.so'_start is called so at this point we haven't loaded the library list and haven't set the rendezvous breakpoint either. I think the correct solution to the problem is to change DynamicLoaderPOSIXDYLD to set the (current) entry breakpoint at a location what is hit before any code is executed, but I don't know what is the reasonable location for the (something what works on all platforms). -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev