[PATCH] D33184: [DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 02:22:01 PDT 2017
grimar added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFRelocMap.h:20
struct RelocAddrEntry {
uint8_t Width;
+ uint64_t SectionIndex;
----------------
rafael wrote:
> Please rebase, as Width was removed.
Done.
================
Comment at: include/llvm/Object/ELFObjectFile.h:652
+ auto SectionsOrErr = EF.sections();
+ if (!SectionsOrErr)
+ return 0;
----------------
rafael wrote:
> I think you can assert in here.
>
> This function is passed a section, so whatever found it must have looked in the section table.
Done.
================
Comment at: lib/Object/COFFObjectFile.cpp:297
+uint64_t COFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
+ // TODO: COFFObjectFile::getSectionIndex() not implemented
+ return -1LL;
----------------
rafael wrote:
> This should be trivial to implement:
>
> toSec(Sec) - SectionTable.
>
>
Cool, thanks ! I just do not know anything about non-ELF so did not even try to implement getSectionIndex() for those types.
================
Comment at: lib/Object/MachOObjectFile.cpp:1824
+uint64_t MachOObjectFile::getSectionIndex(DataRefImpl Sec) const {
+ // TODO: MachOObjectFile::getSectionIndex() not implemented
+ return -1LL;
----------------
rafael wrote:
> This is just "return Sec.d.a"
Done.
https://reviews.llvm.org/D33184
More information about the llvm-commits
mailing list