diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-08-27 07:17:47 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-08-27 07:17:47 +0000 |
commit | 034e57a29706a0d179cd0dc477622cb5ba9ea193 (patch) | |
tree | 76a9b23f8de160f063513a5a8b7833689e15978e /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | 6d44554cd471766286034ab560a2578ce5175c2f (diff) | |
download | llvm-034e57a29706a0d179cd0dc477622cb5ba9ea193.zip llvm-034e57a29706a0d179cd0dc477622cb5ba9ea193.tar.gz llvm-034e57a29706a0d179cd0dc477622cb5ba9ea193.tar.bz2 |
Add basic support for .debug_ranges section to LLVM's DebugInfo library.
This section (introduced in DWARF-3) is used to define instruction address
ranges for functions that are not contiguous and can't be described
by low_pc/high_pc attributes (this is the usual case for inlined subroutines).
The patch is the first step to support fetching complete inlining info from DWARF.
Reviewed by Benjamin Kramer.
llvm-svn: 162657
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index ec0b4ae..59ecafa 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -59,6 +59,7 @@ static void DumpInput(const StringRef &Filename) { StringRef DebugLineSection; StringRef DebugArangesSection; StringRef DebugStringSection; + StringRef DebugRangesSection; error_code ec; for (section_iterator i = Obj->begin_sections(), @@ -82,6 +83,8 @@ static void DumpInput(const StringRef &Filename) { DebugArangesSection = data; else if (name == "debug_str") DebugStringSection = data; + else if (name == "debug_ranges") + DebugRangesSection = data; } OwningPtr<DIContext> dictx(DIContext::getDWARFContext(/*FIXME*/true, @@ -89,7 +92,8 @@ static void DumpInput(const StringRef &Filename) { DebugAbbrevSection, DebugArangesSection, DebugLineSection, - DebugStringSection)); + DebugStringSection, + DebugRangesSection)); if (Address == -1ULL) { outs() << Filename << ":\tfile format " << Obj->getFileFormatName() << "\n\n"; |