summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-10-03 18:39:13 +0000
committerHans Wennborg <hans@hanshq.net>2017-10-03 18:39:13 +0000
commitab2177edf734171c3dae044cb4beddd2d36e46e3 (patch)
tree0f577e3f852c2b60ac607f589d3aa8d2bde60945 /llvm/lib/DebugInfo
parent9a9048e19fc8cfa1c3a036891a4bb137dd6b771d (diff)
downloadbcm5719-llvm-ab2177edf734171c3dae044cb4beddd2d36e46e3.tar.gz
bcm5719-llvm-ab2177edf734171c3dae044cb4beddd2d36e46e3.zip
Revert r314817 "[dwarfdump] Add -lookup option"
The test fails on Linux; see follow-up email on the llvm-commits list. > Add the option to lookup an address in the debug information and print > out the file, function, block and line table details. > > Differential revision: https://reviews.llvm.org/D38409 This also reverts the follow-up r314818: > [test] Fix llvm-dwarfdump/cmdline.test > > Fixes test/tools/llvm-dwarfdump/cmdline.test llvm-svn: 314825
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp30
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp2
2 files changed, 2 insertions, 30 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 24aa666fb81..bf0c4b01dc0 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -48,6 +48,7 @@
#include <cstdint>
#include <map>
#include <string>
+#include <tuple>
#include <utility>
#include <vector>
@@ -722,35 +723,6 @@ DWARFCompileUnit *DWARFContext::getCompileUnitForAddress(uint64_t Address) {
return getCompileUnitForOffset(CUOffset);
}
-DWARFContext::DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address) {
- DIEsForAddress Result;
-
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address);
- if (!CU)
- return Result;
-
- Result.CompileUnit = CU;
- Result.FunctionDIE = CU->getSubroutineForAddress(Address);
-
- std::vector<DWARFDie> Worklist;
- Worklist.push_back(Result.FunctionDIE);
- while (!Worklist.empty()) {
- DWARFDie DIE = Worklist.back();
- Worklist.pop_back();
-
- if (DIE.getTag() == DW_TAG_lexical_block &&
- DIE.addressRangeContainsAddress(Address)) {
- Result.BlockDIE = DIE;
- break;
- }
-
- for (auto Child : DIE)
- Worklist.push_back(Child);
- }
-
- return Result;
-}
-
static bool getFunctionNameAndStartLineForAddress(DWARFCompileUnit *CU,
uint64_t Address,
FunctionNameKind Kind,
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index 98e548b8836..86451faa79d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -440,7 +440,7 @@ DWARFDie DWARFUnit::getSibling(const DWARFDebugInfoEntry *Die) {
// NULL DIEs don't have siblings.
if (Die->getAbbreviationDeclarationPtr() == nullptr)
return DWARFDie();
-
+
// Find the next DIE whose depth is the same as the Die's depth.
for (size_t I = getDIEIndex(Die) + 1, EndIdx = DieArray.size(); I < EndIdx;
++I) {
OpenPOWER on IntegriCloud