brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · d8a71ae Raw
70 lines · plain
1## Check that 'llvm-objdump --no-print-imm-hex -d' prints comments generated by the disassembler.2 3# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t4# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s5 6# CHECK:      0000000000000000 <foo>:7# CHECK-NEXT:        0:   nop8# CHECK-NEXT:        1:   cmpl $305419896, %eax   # imm = 0x123456789 10## Check that comments and locations of variables can be printed together.11# RUN: llvm-objdump --no-print-imm-hex -d --debug-vars --no-show-raw-insn %t | \12# RUN:   FileCheck %s --check-prefix=DBGVARS13 14# DBGVARS:      0000000000000000 <foo>:15# DBGVARS-NEXT:                                                         ┠─ bar = RDX16# DBGVARS-NEXT:        0:   nop                                         ┃17# DBGVARS-NEXT:        1:   cmpl $305419896, %eax   # imm = 0x12345678  ┻18 19    .text20foo:21    nop22    cmpl $0x12345678, %eax23.LFooEnd:24 25    .section .debug_abbrev,"",@progbits26    .uleb128 1                      # Abbreviation Code27    .uleb128 0x11                   # DW_TAG_compile_unit28    .byte 1                         # DW_CHILDREN_yes29    .byte 0                         # EOM(1)30    .byte 0                         # EOM(2)31    .uleb128 2                      # Abbreviation Code32    .uleb128 0x2e                   # DW_TAG_subprogram33    .byte 1                         # DW_CHILDREN_yes34    .uleb128 0x11                   # DW_AT_low_pc35    .uleb128 0x01                   # DW_FORM_addr36    .uleb128 0x12                   # DW_AT_high_pc37    .uleb128 0x06                   # DW_FORM_data438    .byte 0                         # EOM(1)39    .byte 0                         # EOM(2)40    .uleb128 3                      # Abbreviation Code41    .uleb128 0x34                   # DW_TAG_variable42    .byte 0                         # DW_CHILDREN_no43    .uleb128 0x02                   # DW_AT_location44    .uleb128 0x18                   # DW_FORM_exprloc45    .uleb128 0x03                   # DW_AT_name46    .uleb128 0x08                   # DW_FORM_string47    .byte 0                         # EOM(1)48    .byte 0                         # EOM(2)49    .byte 0                         # EOM(3)50 51    .section .debug_info,"",@progbits52    .long .LCuEnd-.LCuBegin         # Length of Unit53.LCuBegin:54    .short 4                        # DWARF version number55    .long .debug_abbrev             # Offset Into Abbrev. Section56    .byte 8                         # Address Size57    .uleb128 1                      # Abbrev [1] DW_TAG_compile_unit58    .uleb128 2                      # Abbrev [2] DW_TAG_subprogram59    .quad foo                       # DW_AT_low_pc60    .long .LFooEnd-foo              # DW_AT_high_pc61    .uleb128 3                      # Abbrev [3] DW_TAG_variable62    .byte .LLocEnd-.LLocBegin       # DW_AT_location63.LLocBegin:64    .byte 0x51                      # DW_OP_reg165.LLocEnd:66    .asciz "bar"                    # DW_FORM_string67    .byte 0                         # End Of Children Mark68    .byte 0                         # End Of Children Mark69.LCuEnd:70