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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to