summaryrefslogtreecommitdiff
path: root/tools/llvm-dwarfdump
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-05-19 18:45:32 +0000
committerAlexey Samsonov <samsonov@google.com>2014-05-19 18:45:32 +0000
commit8ad418b61b53a619bf9dd954c5399b69b7d78a96 (patch)
tree5319176d794dced90625cce64530a80ed04014b8 /tools/llvm-dwarfdump
parent20a6a27beacccf89ba7ad015fd98fa206637e9f1 (diff)
downloadllvm-8ad418b61b53a619bf9dd954c5399b69b7d78a96.tar.gz
llvm-8ad418b61b53a619bf9dd954c5399b69b7d78a96.tar.bz2
llvm-8ad418b61b53a619bf9dd954c5399b69b7d78a96.tar.xz
Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dwarfdump')
-rw-r--r--tools/llvm-dwarfdump/llvm-dwarfdump.cpp52
1 files changed, 4 insertions, 48 deletions
diff --git a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 58914f08a4..46ac36e173 100644
--- a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -38,19 +38,6 @@ static cl::list<std::string>
InputFilenames(cl::Positional, cl::desc("<input object files>"),
cl::ZeroOrMore);
-static cl::opt<unsigned long long>
-Address("address", cl::init(-1ULL),
- cl::desc("Print line information for a given address"));
-
-static cl::opt<bool>
-PrintFunctions("functions", cl::init(false),
- cl::desc("Print function names as well as line information "
- "for a given address"));
-
-static cl::opt<bool>
-PrintInlining("inlining", cl::init(false),
- cl::desc("Print all inlined frames for a given address"));
-
static cl::opt<DIDumpType>
DumpType("debug-dump", cl::init(DIDT_All),
cl::desc("Dump of debug sections:"),
@@ -78,12 +65,6 @@ DumpType("debug-dump", cl::init(DIDT_All),
clEnumValN(DIDT_StrOffsetsDwo, "str_offsets.dwo", ".debug_str_offsets.dwo"),
clEnumValEnd));
-static void PrintDILineInfo(DILineInfo dli) {
- if (PrintFunctions)
- outs() << dli.FunctionName << "\n";
- outs() << dli.FileName << ':' << dli.Line << ':' << dli.Column << '\n';
-}
-
static void DumpInput(const StringRef &Filename) {
std::unique_ptr<MemoryBuffer> Buff;
@@ -101,35 +82,10 @@ static void DumpInput(const StringRef &Filename) {
std::unique_ptr<DIContext> DICtx(DIContext::getDWARFContext(Obj.get()));
- if (Address == -1ULL) {
- outs() << Filename
- << ":\tfile format " << Obj->getFileFormatName() << "\n\n";
- // Dump the complete DWARF structure.
- DICtx->dump(outs(), DumpType);
- } else {
- // Print line info for the specified address.
- DILineInfoSpecifier Spec(
- DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath,
- PrintFunctions ? DILineInfoSpecifier::FunctionNameKind::LinkageName
- : DILineInfoSpecifier::FunctionNameKind::None);
- if (PrintInlining) {
- DIInliningInfo InliningInfo =
- DICtx->getInliningInfoForAddress(Address, Spec);
- uint32_t n = InliningInfo.getNumberOfFrames();
- if (n == 0) {
- // Print one empty debug line info in any case.
- PrintDILineInfo(DILineInfo());
- } else {
- for (uint32_t i = 0; i < n; i++) {
- DILineInfo dli = InliningInfo.getFrame(i);
- PrintDILineInfo(dli);
- }
- }
- } else {
- DILineInfo dli = DICtx->getLineInfoForAddress(Address, Spec);
- PrintDILineInfo(dli);
- }
- }
+ outs() << Filename
+ << ":\tfile format " << Obj->getFileFormatName() << "\n\n";
+ // Dump the complete DWARF structure.
+ DICtx->dump(outs(), DumpType);
}
int main(int argc, char **argv) {