labath requested changes to this revision.
labath added a reviewer: jingham.
labath added a comment.
This revision now requires changes to proceed.

I don't think this is the right solution to this problem.

The way I see it, there are two separate questions here:

- why is the module containing `hz` not loaded? The core file contains a proper 
memory address for it, does it not? We need to figure out why is that not being 
applied. I took a brief look, but I couldn't actually find the place where elf 
file modules are created and where their load addresses are set. I think the 
first step should be to figure out how this actually works (or why does it not 
work). Without a load address, a lot of things will not operate properly. If it 
helps you can look at ProcessMinidump::ReadModuleList to see how it works 
there, but be aware that this uses a different (I am not saying that it's 
better or worse) approach to create and load modules -- it does it directly, 
whereas the elf class seems to rely on DynamicLoaderStatic to do the loading.

- should "memory read" work on unloaded modules. I think this was deliberately 
disabled because the concept of "memory" only really makes sense on a "running 
process" (a core file is considered a running process here). However, your 
example kinda makes sense even on an unloaded module (a not-yet-started process 
if the typical situation where you get those). So, we could consider making 
this work as well. I'm adding Jim to see what he thinks about this. However, 
**if** we do decide to do that, then the right solution is to use the Target 
version of `ReadMemory` which accepts an Address object directly. D113098 
<https://reviews.llvm.org/D113098> might be relevant/interesting here.


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

https://reviews.llvm.org/D114675

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to