[Lldb-commits] [PATCH] D114675: [lldb] [Target] Support fallback to file address in ReadMemory()

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 29 00:47:33 PST 2021


labath added a comment.

In D114675#3157622 <https://reviews.llvm.org/D114675#3157622>, @mgorny wrote:

> In D114675#3157595 <https://reviews.llvm.org/D114675#3157595>, @labath wrote:
>
>> I don't think this is the right solution to this problem.
>
> If it's not, then the expression parser should probably be changed for consistency.

I don't think we'd want to do that (*), but we could definitely make sure that the memory read command produces a meaningful error message instead of a bunch of zeroes. But lets wait to see what Jim thinks about that.

(*) My reasoning is that the expression evaluator can be used to view the static contents of the module before the process is even launched, whereas the memory read command is low level, and has "memory" in its name -- if there's no process, then there's no memory.

>> 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?
>
> Not sure what you're asking about. The symbol's address (as determined from the kernel executable) is found in one of the PT_LOAD segments.

Yes, but is that information making its way to the right place (Target::GetSectionLoadList)? That's the thing which provides load addresses for section+offset pairs. What does "image list" say in this case?


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

https://reviews.llvm.org/D114675



More information about the lldb-commits mailing list