Commit | Line | Data |
---|---|---|
4359dff1 JK |
1 | /* This testcase is part of GDB, the GNU debugger. |
2 | ||
88b9d363 | 3 | Copyright 2004-2022 Free Software Foundation, Inc. |
4359dff1 JK |
4 | |
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | ||
f01dcfd9 KB |
18 | #define CONCAT1(a, b) CONCAT2(a, b) |
19 | #define CONCAT2(a, b) a ## b | |
20 | ||
21 | #ifdef SYMBOL_PREFIX | |
22 | # define SYMBOL(str) CONCAT1(SYMBOL_PREFIX, str) | |
23 | #else | |
24 | # define SYMBOL(str) str | |
25 | #endif | |
26 | ||
4359dff1 JK |
27 | .text |
28 | .Lbegin_text1: | |
29 | ||
f01dcfd9 KB |
30 | .globl SYMBOL(main) |
31 | .type SYMBOL(main), %function | |
32 | SYMBOL(main): | |
4359dff1 JK |
33 | .Lbegin_main: |
34 | .int 0 | |
35 | .Lend_main: | |
f01dcfd9 | 36 | .size SYMBOL(main), .-SYMBOL(main) |
4359dff1 JK |
37 | |
38 | .globl func2 | |
39 | .type func2, %function | |
40 | func2: | |
41 | .int 0 | |
42 | .size func2, .-func2 | |
43 | ||
44 | .Lend_text1: | |
45 | ||
46 | /* Debug information */ | |
47 | ||
48 | .section .debug_info | |
49 | .Lcu1_begin: | |
50 | /* CU header */ | |
51 | .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */ | |
52 | .Lcu1_start: | |
53 | .2byte 2 /* DWARF Version */ | |
54 | .4byte .Labbrev1_begin /* Offset into abbrev section */ | |
55 | .byte 4 /* Pointer size */ | |
56 | ||
57 | /* CU die */ | |
58 | .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ | |
59 | .4byte .Lend_text1 /* DW_AT_high_pc */ | |
60 | .4byte .Lbegin_text1 /* DW_AT_low_pc */ | |
61 | .ascii "file1.txt\0" /* DW_AT_name */ | |
62 | .ascii "GNU C 3.3.3\0" /* DW_AT_producer */ | |
63 | .byte 1 /* DW_AT_language (C) */ | |
64 | ||
65 | /* main */ | |
66 | .uleb128 2 /* Abbrev: DW_TAG_subprogram */ | |
67 | .byte 1 /* DW_AT_external */ | |
68 | .ascii "main\0" /* DW_AT_name */ | |
69 | .4byte .Ldebug_ranges /* DW_AT_ranges */ | |
70 | ||
71 | .byte 0 /* End of children of CU */ | |
72 | .Lcu1_end: | |
73 | ||
74 | /* DW_AT_ranges. */ | |
75 | .section .debug_ranges | |
76 | .Ldebug_ranges: | |
77 | .4byte .Lbegin_main | |
78 | .4byte .Lend_main - 1 | |
79 | /* Make it slightly more interesting to set pending_addrmap_interesting. */ | |
80 | .4byte .Lend_main - 1 | |
81 | .4byte .Lend_main | |
82 | .4byte 0 | |
83 | .4byte 0 | |
84 | ||
85 | /* Abbrev table */ | |
86 | .section .debug_abbrev | |
87 | .Labbrev1_begin: | |
88 | .uleb128 1 /* Abbrev code */ | |
89 | .uleb128 0x11 /* DW_TAG_compile_unit */ | |
90 | .byte 1 /* has_children */ | |
91 | .uleb128 0x12 /* DW_AT_high_pc */ | |
92 | .uleb128 0x1 /* DW_FORM_addr */ | |
93 | .uleb128 0x11 /* DW_AT_low_pc */ | |
94 | .uleb128 0x1 /* DW_FORM_addr */ | |
95 | .uleb128 0x3 /* DW_AT_name */ | |
96 | .uleb128 0x8 /* DW_FORM_string */ | |
97 | .uleb128 0x25 /* DW_AT_producer */ | |
98 | .uleb128 0x8 /* DW_FORM_string */ | |
99 | .uleb128 0x13 /* DW_AT_language */ | |
100 | .uleb128 0xb /* DW_FORM_data1 */ | |
101 | .byte 0x0 /* Terminator */ | |
102 | .byte 0x0 /* Terminator */ | |
103 | ||
104 | .uleb128 2 /* Abbrev code */ | |
105 | .uleb128 0x2e /* DW_TAG_subprogram */ | |
106 | .byte 0 /* has_children */ | |
107 | .uleb128 0x3f /* DW_AT_external */ | |
108 | .uleb128 0xc /* DW_FORM_flag */ | |
109 | .uleb128 0x3 /* DW_AT_name */ | |
110 | .uleb128 0x8 /* DW_FORM_string */ | |
111 | .uleb128 0x55 /* DW_AT_ranges */ | |
112 | .uleb128 0x6 /* DW_FORM_data4 */ | |
113 | .byte 0x0 /* Terminator */ | |
114 | .byte 0x0 /* Terminator */ | |
115 | ||
116 | .byte 0x0 /* Terminator */ | |
117 | .byte 0x0 /* Terminator */ |