1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[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

llvm-svn: 315897
This commit is contained in:
George Rimar 2017-10-16 10:26:17 +00:00
parent 541dbb6cd5
commit d99940d7e5
2 changed files with 16 additions and 0 deletions

View File

@ -163,6 +163,7 @@ void FrameEntry::parseInstructions(DataExtractor Data, uint32_t *Offset,
case DW_CFA_same_value: case DW_CFA_same_value:
case DW_CFA_def_cfa_register: case DW_CFA_def_cfa_register:
case DW_CFA_def_cfa_offset: case DW_CFA_def_cfa_offset:
case DW_CFA_GNU_args_size:
// Operands: ULEB128 // Operands: ULEB128
addInstruction(Opcode, Data.getULEB128(Offset)); addInstruction(Opcode, Data.getULEB128(Offset));
break; break;

View File

@ -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,@function
foo:
.cfi_startproc
.cfi_escape 0x2e, 0x10
.cfi_endproc