summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-19 00:29:42 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-19 00:29:42 +0000
commit3af14421f2d8af2da639c7316bd90b5e397cef33 (patch)
tree2d9b44b96cd06fa46cdd82ae23f64e00a6c26dc2
parent265134c73127003ed334fe9a33c9d26843d748c5 (diff)
downloadllvm-3af14421f2d8af2da639c7316bd90b5e397cef33.tar.gz
llvm-dwarfdump: support for emitting only the debug_types section using -debug-dump
llvm-svn: 195063
-rw-r--r--llvm/test/DebugInfo/dwarfdump-type-units.test4
-rw-r--r--llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/dwarfdump-type-units.test b/llvm/test/DebugInfo/dwarfdump-type-units.test
index 311a77a41b27..5fca81d70f21 100644
--- a/llvm/test/DebugInfo/dwarfdump-type-units.test
+++ b/llvm/test/DebugInfo/dwarfdump-type-units.test
@@ -1,6 +1,7 @@
RUN: llvm-dwarfdump %p/Inputs/dwarfdump-type-units.elf-x86-64 > %t
RUN: cat %t | FileCheck -check-prefix=FOO %s
RUN: cat %t | FileCheck -check-prefix=BAR %s
+RUN: llvm-dwarfdump -debug-dump=types %p/Inputs/dwarfdump-type-units.elf-x86-64 | FileCheck -check-prefix=TYPES %s
FOO: debug_info contents:
FOO: DW_TAG_variable
@@ -26,3 +27,6 @@ BAR: DW_TAG_type_unit
BAR-NOT: NULL
BAR: 0x0000[[BAR_OFF]]: DW_TAG_structure_type
BAR-NEXT: DW_AT_name {{.*}}"bar"
+
+TYPES-NOT: debug_info contents:
+TYPES: debug_types contents:
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index c46bd6b06b40..413a50b9b90b 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -62,6 +62,7 @@ DumpType("debug-dump", cl::init(DIDT_All),
clEnumValN(DIDT_Aranges, "aranges", ".debug_aranges"),
clEnumValN(DIDT_Info, "info", ".debug_info"),
clEnumValN(DIDT_InfoDwo, "info.dwo", ".debug_info.dwo"),
+ clEnumValN(DIDT_Types, "types", ".debug_types"),
clEnumValN(DIDT_Line, "line", ".debug_line"),
clEnumValN(DIDT_Loc, "loc", ".debug_loc"),
clEnumValN(DIDT_Frames, "frames", ".debug_frame"),