From 8ad418b61b53a619bf9dd954c5399b69b7d78a96 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 19 May 2014 18:45:32 +0000 Subject: 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 --- tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 52 +++------------------------------ 1 file changed, 4 insertions(+), 48 deletions(-) (limited to 'tools') 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 InputFilenames(cl::Positional, cl::desc(""), cl::ZeroOrMore); -static cl::opt -Address("address", cl::init(-1ULL), - cl::desc("Print line information for a given address")); - -static cl::opt -PrintFunctions("functions", cl::init(false), - cl::desc("Print function names as well as line information " - "for a given address")); - -static cl::opt -PrintInlining("inlining", cl::init(false), - cl::desc("Print all inlined frames for a given address")); - static cl::opt 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 Buff; @@ -101,35 +82,10 @@ static void DumpInput(const StringRef &Filename) { std::unique_ptr 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) { -- cgit v1.2.3