On 11/12/2018 19:17, Jim Ingham wrote:
It the section isn't in the target's SectionLoadList, then GetLoadAddress
should return LLDB_INVALID_ADDRESS. I.e. this bit from
Section::GetLoadBaseAddress:
load_base_addr = target->GetSectionLoadList().GetSectionLoadAddress(
const_cast<Section *>(this)->shared_from_this());
should return LLDB_INVALID_ADDRESS because the section isn't in the load list.
Are we putting sections in the target's section load list before we've actually
seen them loaded. I'm pretty sure we shouldn't do that.
Jim
The issue here is that the Address object in question is not backed by
any section. It has a null section, and just an offset member.
In this case Address::GetLoadAddress just decides to return that address
as a load address, which I imagine is correct in some situations, but in
this case our intention was for this address to represent a file address
(which would still need to be adjusted to account for where the module
ended up being loaded).
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits