[Lldb-commits] [lldb] [LLDB][Minidump] Have Minidumps save off and properly read TLS data (PR #109477)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 25 12:10:47 PDT 2024
labath wrote:
The way I see it, there should be no distinction between "loading in a core file" and "actually loading" a module. "Loading of a module", in the sense that I'm using it here, consists of two steps:
- adding the module to the target's list of modules (usually via target.GetOrCreateModule)
- setting the load address of the module (loading in the narrow sense) -- done by calling module.SetLoadAddress
Both of these steps are necessary for a module to work properly, but it shouldn't matter who's doing the loading (except that probably thread local sections will not work for a module which was not loaded by the dynamic loader).
I think there's nothing wrong with giving the dynamic loader a chance to load any additional modules (for all processes even, not just core files). Normally, it should compute the same address (if any) that was produced by the process class, but if it happens to compute a different one, so be it (it probably means one of them has a bug).
Your mention of a relocation makes it sound like this is already happening though (process computing one load address and then the DYLD "relocating" it). Is that true? If so, then I think we ought to figure out what's causing the difference (and which one is correct).
https://github.com/llvm/llvm-project/pull/109477
More information about the lldb-commits
mailing list