diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-04-22 21:32:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-04-22 21:32:59 +0000 |
commit | 9a4f3cb275b148f11850ca24c8ff245990ee327d (patch) | |
tree | 8517a66962c978c898fd3622365e52df588789c2 /llvm/lib | |
parent | 18ce9d82c6ec4be482fe8f1f29e0a99a854fd9e1 (diff) | |
download | bcm5719-llvm-9a4f3cb275b148f11850ca24c8ff245990ee327d.tar.gz bcm5719-llvm-9a4f3cb275b148f11850ca24c8ff245990ee327d.zip |
llvm-symbolizer: prefer .dwo contents over fission-gmlt-like-data when .dwo file is present
Rather than relying on the gmlt-like data emitted into the .o/executable
which only contains the simple name of any inlined functions, use the
.dwo file if present.
Test symbolication with/without a .dwo, and the old test that was
testing behavior when no gmlt-like data was present. (I haven't included
a test of non-gmlt-like data + no .dwo (that would be akin to
symbolication with no debug info) but we could add one for completeness)
The test was simplified a bit to be a little clearer (unoptimized, force
inline, using a function call as the inlined entity) and regenerated
with ToT clang. For the no-gmlt-like-data case, I modified Clang back to
its old behavior temporarily & the .dwo file is identical so it is
shared between the two executables.
llvm-svn: 267227
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index fdc9da3fbae..0430265ae74 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -378,19 +378,14 @@ DWARFUnit::getInlinedChainForAddress(uint64_t Address) { // First, find a subprogram that contains the given address (the root // of inlined chain). const DWARFUnit *ChainCU = nullptr; - const DWARFDebugInfoEntryMinimal *SubprogramDIE = - getSubprogramForAddress(Address); - if (SubprogramDIE) { + const DWARFDebugInfoEntryMinimal *SubprogramDIE; + // Try to look for subprogram DIEs in the DWO file. + parseDWO(); + if (DWO) { + if ((SubprogramDIE = DWO->getUnit()->getSubprogramForAddress(Address))) + ChainCU = DWO->getUnit(); + } else if ((SubprogramDIE = getSubprogramForAddress(Address))) ChainCU = this; - } else { - // Try to look for subprogram DIEs in the DWO file. - parseDWO(); - if (DWO.get()) { - SubprogramDIE = DWO->getUnit()->getSubprogramForAddress(Address); - if (SubprogramDIE) - ChainCU = DWO->getUnit(); - } - } // Get inlined chain rooted at this subprogram DIE. if (!SubprogramDIE) |