• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Check that debug info line number pointing beyond the end of the file
2# doesn't cause a segmentation fault in llvm-objdump.
3
4# To rebuild the input: clang -g debug-info-fileinfo.S -o debug-info-fileinfo.exe -nostdlib
5
6# RUN: llvm-objdump -S %p/Inputs/debug-info-fileinfo.exe.elf-x86_64 | FileCheck %s
7
8# CHECK: Disassembly of section .text:
9# CHECK: _start
10# CHECK-NEXT:   400078:       c3      retq
11# CHECK: foo
12# CHECK-NEXT:   400079:       90      nop
13# CHECK-NEXT:   40007a:       90      nop
14# CHECK-NEXT:   40007b:       c3      retq
15
16.text
17
18.global _start; .type _start, STT_FUNC; _start:
19    ret
20
21.global foo; .type foo, STT_FUNC; foo:
22    # foo
23    # bar
24    # baz
25    nop
26    nop
27    ret
28