1 ; Test that llvm-dwarfdump can handle DWARF32 v3 with addr_size = 0x02
2 ; Input object file was produced from source containing just "int x;" with
3 ; clang -target avr -gdwarf-3 -c dwarfdump-16bit-addr.c
5 ; REQUIRES: avr-registered-target
6 ; RUN: llvm-dwarfdump --debug-info %S/Inputs/dwarfdump-16bit-addr.o | FileCheck %s
7 ; RUN: llvm-dwarfdump --verify %S/Inputs/dwarfdump-16bit-addr.o
9 ; CHECK: Inputs/dwarfdump-16bit-addr.o: file format elf32-avr
11 ; CHECK: .debug_info contents:
12 ; CHECK: 0x00000000: Compile Unit: length = 0x00000032, format = DWARF32, version = 0x0003, abbr_offset = 0x0000, addr_size = 0x02 (next unit at 0x00000036)
14 ; CHECK: 0x0000000b: DW_TAG_compile_unit
15 ; CHECK: DW_AT_producer ("clang version 10.0.0-4ubuntu1 ")
16 ; CHECK: DW_AT_language (DW_LANG_C99)
17 ; CHECK: DW_AT_name ("dwarfdump-16bit-addr.c")
18 ; CHECK: DW_AT_stmt_list (0x00000000)
19 ; CHECK: DW_AT_comp_dir ("/tmp")
21 ; CHECK: 0x0000001e: DW_TAG_variable
22 ; CHECK: DW_AT_name ("x")
23 ; CHECK: DW_AT_type (0x0000002e "int")
24 ; CHECK: DW_AT_external (0x01)
25 ; CHECK: DW_AT_decl_file ("/tmp{{[/\\]}}dwarfdump-16bit-addr.c")
26 ; CHECK: DW_AT_decl_line (1)
27 ; CHECK: DW_AT_location (DW_OP_addr 0x0)
29 ; CHECK: 0x0000002e: DW_TAG_base_type
30 ; CHECK: DW_AT_name ("int")
31 ; CHECK: DW_AT_encoding (DW_ATE_signed)
32 ; CHECK: DW_AT_byte_size (0x02)
34 ; CHECK: 0x00000035: NULL