• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
2# RUN: not llvm-dwarfdump -debug-aranges %t.o 2>&1 | FileCheck %s
3# RUN: not llvm-dwarfdump -lookup 10 %t.o 2>&1 | FileCheck %s
4
5## This checks that llvm-dwarfdump shows parsing errors in .debug_aranges.
6## For more error cases see unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp.
7
8# CHECK: the length of address range table at offset 0x0 exceeds section size
9
10    .section .debug_aranges,"",@progbits
11    .long   .Lend - .Lversion + 1   # The length exceeds the section boundaries
12.Lversion:
13    .short  2                       # Version
14    .long   0                       # Debug Info Offset
15    .byte   4                       # Address Size
16    .byte   0                       # Segment Selector Size
17    .space  4                       # Padding
18.Ltuples:
19    .long   0, 1                    # Address and length
20    .long   0, 0                    # Termination tuple
21.Lend:
22