[Lldb-commits] [PATCH] D55356: Add a method to get the "base" file address of an object file
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 7 03:26:26 PST 2018
labath planned changes to this revision.
labath added a comment.
In D55356#1321863 <https://reviews.llvm.org/D55356#1321863>, @clayborg wrote:
> This is already available with:
>
> virtual lldb_private::Address ObjectFile::GetHeaderAddress();
>
>
> It return a lldb_private::Address which is section offset, but nothing stopping us from returning a lldb_private::Address with no section and just the file address. For mach-o the mach header is in the __TEXT segment, but not true for other file formats. I am ok if we need to rename "GetHeaderAddress()" to something else.
Thanks for pointing that out. I was very surprised that this functionality is not available already. It looks like all/most uses of `GetHeaderAddress` don't really care that there is a header located at that address, but are rather interested in it's property of being a base address for various calculations (the same thing that I am). So I've created D55422 <https://reviews.llvm.org/D55422> to rename it to something more appropriate.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55356/new/
https://reviews.llvm.org/D55356
More information about the lldb-commits
mailing list