[Lldb-commits] [lldb] [LLDB][Minidump] Have Minidumps save off and properly read TLS data (PR #109477)
Jacob Lalonde via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 23 11:27:02 PDT 2024
Jlalond wrote:
@labath I really like the idea to add the TLS saving to the dynamic loader, I'll add that,
As for the dynamic loader, I don't like how I've modified it. When a minidump is loaded, the link map isn't properly relocated, so TLS data is searched for relative to module lowest in memory.
So for my example, we were looking for TLS data in `5555ef...` when the TLS section in the live process was in the relocated module at `777f... `. Forcing the POSIX DYLD to rebase them worked, but it's at best a hack.
[This codepath](https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp#L118) results in none of the modules being loaded, or rebased, and I don't why this should apply without checking all modules.
https://github.com/llvm/llvm-project/pull/109477
More information about the lldb-commits
mailing list