|
| 1 | +# Test that we can decode `DW_OP_GNU_implicit_pointer` (0xf2) |
| 2 | +# RUN: yaml2obj %s | llvm-dwarfdump - | FileCheck %s |
| 3 | + |
| 4 | +# CHECK: DW_TAG_variable |
| 5 | +# CHECK-NEXT: DW_AT_location (DW_OP_GNU_implicit_pointer 0x2a +4) |
| 6 | + |
| 7 | +--- !ELF |
| 8 | +FileHeader: |
| 9 | + Class: ELFCLASS64 |
| 10 | + Data: ELFDATA2LSB |
| 11 | + Type: ET_DYN |
| 12 | + Machine: EM_X86_64 |
| 13 | +DWARF: |
| 14 | + debug_abbrev: |
| 15 | + - Table: |
| 16 | + - Code: 0x00000001 |
| 17 | + Tag: DW_TAG_compile_unit |
| 18 | + Children: DW_CHILDREN_yes |
| 19 | + Attributes: |
| 20 | + - Attribute: DW_AT_language |
| 21 | + Form: DW_FORM_data2 |
| 22 | + - Attribute: DW_AT_low_pc |
| 23 | + Form: DW_FORM_addr |
| 24 | + - Attribute: DW_AT_high_pc |
| 25 | + Form: DW_FORM_data4 |
| 26 | + - Code: 0x00000002 |
| 27 | + Tag: DW_TAG_subprogram |
| 28 | + Children: DW_CHILDREN_yes |
| 29 | + Attributes: |
| 30 | + - Attribute: DW_AT_low_pc |
| 31 | + Form: DW_FORM_addr |
| 32 | + - Attribute: DW_AT_high_pc |
| 33 | + Form: DW_FORM_data4 |
| 34 | + - Attribute: DW_AT_frame_base |
| 35 | + Form: DW_FORM_exprloc |
| 36 | + - Code: 0x00000003 |
| 37 | + Tag: DW_TAG_formal_parameter |
| 38 | + Children: DW_CHILDREN_no |
| 39 | + Attributes: |
| 40 | + - Attribute: DW_AT_location |
| 41 | + Form: DW_FORM_exprloc |
| 42 | + - Code: 0x00000004 |
| 43 | + Tag: DW_TAG_variable |
| 44 | + Children: DW_CHILDREN_no |
| 45 | + Attributes: |
| 46 | + - Attribute: DW_AT_location |
| 47 | + Form: DW_FORM_exprloc |
| 48 | + debug_info: |
| 49 | + - Length: 52 |
| 50 | + Version: 5 |
| 51 | + UnitType: DW_UT_compile |
| 52 | + AbbrOffset: 0 |
| 53 | + AddrSize: 8 |
| 54 | + Entries: |
| 55 | + - AbbrCode: 0x00000001 |
| 56 | + Values: |
| 57 | + - Value: 0x000000000000000C |
| 58 | + - Value: 0x0000000100000F50 |
| 59 | + - Value: 0x0000000000000034 |
| 60 | + - AbbrCode: 0x00000002 |
| 61 | + Values: |
| 62 | + - Value: 0x0000000100000F50 |
| 63 | + - Value: 0x0000000000000034 |
| 64 | + - Value: 0x0000000000000001 |
| 65 | + BlockData: |
| 66 | + - 0x56 |
| 67 | + - AbbrCode: 0x00000003 |
| 68 | + Values: |
| 69 | + - Value: 0x0000000000000002 |
| 70 | + BlockData: |
| 71 | + - 0x91 |
| 72 | + - 0x78 |
| 73 | + - AbbrCode: 0x00000004 |
| 74 | + Values: |
| 75 | + - Value: 0x0000000000000006 |
| 76 | + BlockData: |
| 77 | + - 0xf2 # DW_OP_GNU_implicit_pointer |
| 78 | + - 0x2a # Section offset of parameter in the previous entry |
| 79 | + - 0x00 |
| 80 | + - 0x00 |
| 81 | + - 0x00 |
| 82 | + - 0x04 # Pointer references location 4 bytes into value of previous entry |
| 83 | + - AbbrCode: 0x00000000 |
| 84 | + Values: |
| 85 | + - AbbrCode: 0x00000000 |
| 86 | + Values: |
| 87 | +... |
0 commit comments