[llvm] r315897 - [llvm-dwarfdump] - Teach tool to parse DW_CFA_GNU_args_size.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 03:26:17 PDT 2017


Author: grimar
Date: Mon Oct 16 03:26:17 2017
New Revision: 315897

URL: http://llvm.org/viewvc/llvm-project?rev=315897&view=rev
Log:
[llvm-dwarfdump] - Teach tool to parse DW_CFA_GNU_args_size.

Currently llvm-dwarfdump runs into llvm_unreachable when
faces DW_CFA_GNU_args_size. Patch implements the support.

Differential revision: https://reviews.llvm.org/D38879

Added:
    llvm/trunk/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s
Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp?rev=315897&r1=315896&r2=315897&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Mon Oct 16 03:26:17 2017
@@ -163,6 +163,7 @@ void FrameEntry::parseInstructions(DataE
         case DW_CFA_same_value:
         case DW_CFA_def_cfa_register:
         case DW_CFA_def_cfa_offset:
+        case DW_CFA_GNU_args_size:
           // Operands: ULEB128
           addInstruction(Opcode, Data.getULEB128(Offset));
           break;

Added: llvm/trunk/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s?rev=315897&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s (added)
+++ llvm/trunk/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s Mon Oct 16 03:26:17 2017
@@ -0,0 +1,15 @@
+# RUN: llvm-mc %s -filetype=obj -triple=i686-pc-linux -o %t
+# RUN: llvm-dwarfdump -v %t | FileCheck %s
+
+# CHECK:      .eh_frame contents:
+# CHECK:        00000018 00000010 0000001c FDE cie=0000001c pc=00000000...00000000
+# CHECK-NEXT:     DW_CFA_GNU_args_size: +16
+# CHECK-NEXT:     DW_CFA_nop:
+
+.text
+.globl foo
+.type  foo, at function
+foo:
+ .cfi_startproc
+ .cfi_escape 0x2e, 0x10
+ .cfi_endproc




More information about the llvm-commits mailing list