]>
Commit | Line | Data |
---|---|---|
51a5ef0f PS |
1 | --- /dev/null 2010-06-08 20:35:46.800278452 +0200 |
2 | +++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S 2010-06-09 15:22:57.000000000 +0200 | |
3 | @@ -0,0 +1,167 @@ | |
4 | +/* This testcase is part of GDB, the GNU debugger. | |
5 | + | |
6 | + Copyright 2010 Free Software Foundation, Inc. | |
7 | + | |
8 | + This program is free software; you can redistribute it and/or modify | |
9 | + it under the terms of the GNU General Public License as published by | |
10 | + the Free Software Foundation; either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + This program is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU General Public License | |
19 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
20 | + | |
21 | + .file "rh-dwarf4-x86_64.c" | |
22 | + .section .debug_abbrev,"",@progbits | |
23 | +.Ldebug_abbrev0: | |
24 | + .section .debug_info,"",@progbits | |
25 | +.Ldebug_info0: | |
26 | + .section .debug_line,"",@progbits | |
27 | +.Ldebug_line0: | |
28 | + .text | |
29 | +.Ltext0: | |
30 | +.globl main | |
31 | + .type main, @function | |
32 | +main: | |
33 | +.LFB0: | |
34 | + .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c" | |
35 | + # gdb.dwarf2/rh-dwarf4-x86_64.c:20 | |
36 | + .loc 1 20 0 | |
37 | + .cfi_startproc | |
38 | + # basic block 2 | |
39 | + pushq %rbp | |
40 | + .cfi_def_cfa_offset 16 | |
41 | + movq %rsp, %rbp | |
42 | + .cfi_offset 6, -16 | |
43 | + .cfi_def_cfa_register 6 | |
44 | + # gdb.dwarf2/rh-dwarf4-x86_64.c:21 | |
45 | + .loc 1 21 0 | |
46 | + movl $0, %eax | |
47 | + # gdb.dwarf2/rh-dwarf4-x86_64.c:22 | |
48 | + .loc 1 22 0 | |
49 | + leave | |
50 | + .cfi_def_cfa 7, 8 | |
51 | + ret | |
52 | + .cfi_endproc | |
53 | +.LFE0: | |
54 | + .size main, .-main | |
55 | +.Letext0: | |
56 | + .section .debug_info | |
57 | + .long 0x4e # Length of Compilation Unit Info | |
58 | + .value 0x4 # DWARF version number | |
59 | + .long .Ldebug_abbrev0 # Offset Into Abbrev. Section | |
60 | + .byte 0x8 # Pointer Size (in bytes) | |
61 | + .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) | |
62 | + .long .LASF0 # DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)" | |
63 | + .byte 0x1 # DW_AT_language | |
64 | + .long .LASF1 # DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c" | |
65 | + .long .LASF2 # DW_AT_comp_dir | |
66 | + .quad .Ltext0 # DW_AT_low_pc | |
67 | + .quad .Letext0 # DW_AT_high_pc | |
68 | + .long .Ldebug_line0 # DW_AT_stmt_list | |
69 | + .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram) | |
70 | + # DW_AT_external | |
71 | + .long .LASF3 # DW_AT_name: "main" | |
72 | + .byte 0x1 # DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c) | |
73 | + .byte 0x13 # DW_AT_decl_line | |
74 | + # DW_AT_prototyped | |
75 | + .long 0x4a # DW_AT_type | |
76 | + .quad .LFB0 # DW_AT_low_pc | |
77 | + .quad .LFE0 # DW_AT_high_pc | |
78 | + .uleb128 0x1 # DW_AT_frame_base | |
79 | + .byte 0x9c # DW_OP_call_frame_cfa | |
80 | + .uleb128 0x3 # (DIE (0x4a) DW_TAG_base_type) | |
81 | + .byte 0x4 # DW_AT_byte_size | |
82 | + .byte 0x5 # DW_AT_encoding | |
83 | + .ascii "int\0" # DW_AT_name | |
84 | + .byte 0x0 # end of children of DIE 0xb | |
85 | + .section .debug_abbrev | |
86 | + .uleb128 0x1 # (abbrev code) | |
87 | + .uleb128 0x11 # (TAG: DW_TAG_compile_unit) | |
88 | + .byte 0x1 # DW_children_yes | |
89 | + .uleb128 0x25 # (DW_AT_producer) | |
90 | + .uleb128 0xe # (DW_FORM_strp) | |
91 | + .uleb128 0x13 # (DW_AT_language) | |
92 | + .uleb128 0xb # (DW_FORM_data1) | |
93 | + .uleb128 0x3 # (DW_AT_name) | |
94 | + .uleb128 0xe # (DW_FORM_strp) | |
95 | + .uleb128 0x1b # (DW_AT_comp_dir) | |
96 | + .uleb128 0xe # (DW_FORM_strp) | |
97 | + .uleb128 0x11 # (DW_AT_low_pc) | |
98 | + .uleb128 0x1 # (DW_FORM_addr) | |
99 | + .uleb128 0x12 # (DW_AT_high_pc) | |
100 | + .uleb128 0x1 # (DW_FORM_addr) | |
101 | + .uleb128 0x10 # (DW_AT_stmt_list) | |
102 | + .uleb128 0x17 # (DW_FORM_sec_offset) | |
103 | + .byte 0x0 | |
104 | + .byte 0x0 | |
105 | + .uleb128 0x2 # (abbrev code) | |
106 | + .uleb128 0x2e # (TAG: DW_TAG_subprogram) | |
107 | + .byte 0x0 # DW_children_no | |
108 | + .uleb128 0x3f # (DW_AT_external) | |
109 | + .uleb128 0x19 # (DW_FORM_flag_present) | |
110 | + .uleb128 0x3 # (DW_AT_name) | |
111 | + .uleb128 0xe # (DW_FORM_strp) | |
112 | + .uleb128 0x3a # (DW_AT_decl_file) | |
113 | + .uleb128 0xb # (DW_FORM_data1) | |
114 | + .uleb128 0x3b # (DW_AT_decl_line) | |
115 | + .uleb128 0xb # (DW_FORM_data1) | |
116 | + .uleb128 0x27 # (DW_AT_prototyped) | |
117 | + .uleb128 0x19 # (DW_FORM_flag_present) | |
118 | + .uleb128 0x49 # (DW_AT_type) | |
119 | + .uleb128 0x13 # (DW_FORM_ref4) | |
120 | + .uleb128 0x11 # (DW_AT_low_pc) | |
121 | + .uleb128 0x1 # (DW_FORM_addr) | |
122 | + .uleb128 0x12 # (DW_AT_high_pc) | |
123 | + .uleb128 0x1 # (DW_FORM_addr) | |
124 | + .uleb128 0x40 # (DW_AT_frame_base) | |
125 | + .uleb128 0x18 # (DW_FORM_exprloc) | |
126 | + .byte 0x0 | |
127 | + .byte 0x0 | |
128 | + .uleb128 0x3 # (abbrev code) | |
129 | + .uleb128 0x24 # (TAG: DW_TAG_base_type) | |
130 | + .byte 0x0 # DW_children_no | |
131 | + .uleb128 0xb # (DW_AT_byte_size) | |
132 | + .uleb128 0xb # (DW_FORM_data1) | |
133 | + .uleb128 0x3e # (DW_AT_encoding) | |
134 | + .uleb128 0xb # (DW_FORM_data1) | |
135 | + .uleb128 0x3 # (DW_AT_name) | |
136 | + .uleb128 0x8 # (DW_FORM_string) | |
137 | + .byte 0x0 | |
138 | + .byte 0x0 | |
139 | + .byte 0x0 | |
140 | + .section .debug_pubnames,"",@progbits | |
141 | + .long 0x17 # Length of Public Names Info | |
142 | + .value 0x2 # DWARF Version | |
143 | + .long .Ldebug_info0 # Offset of Compilation Unit Info | |
144 | + .long 0x52 # Compilation Unit Length | |
145 | + .long 0x2d # DIE offset | |
146 | + .ascii "main\0" # external name | |
147 | + .long 0x0 | |
148 | + .section .debug_aranges,"",@progbits | |
149 | + .long 0x2c # Length of Address Ranges Info | |
150 | + .value 0x2 # DWARF Version | |
151 | + .long .Ldebug_info0 # Offset of Compilation Unit Info | |
152 | + .byte 0x8 # Size of Address | |
153 | + .byte 0x0 # Size of Segment Descriptor | |
154 | + .value 0x0 # Pad to 16 byte boundary | |
155 | + .value 0x0 | |
156 | + .quad .Ltext0 # Address | |
157 | + .quad .Letext0-.Ltext0 # Length | |
158 | + .quad 0x0 | |
159 | + .quad 0x0 | |
160 | + .section .debug_str,"MS",@progbits,1 | |
161 | +.LASF2: | |
162 | + .string "." | |
163 | +.LASF0: | |
164 | + .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)" | |
165 | +.LASF1: | |
166 | + .string "gdb.dwarf2/rh-dwarf4-x86_64.c" | |
167 | +.LASF3: | |
168 | + .string "main" | |
169 | + .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)" | |
170 | + .section .note.GNU-stack,"",@progbits | |
171 | --- /dev/null 2010-06-08 20:35:46.800278452 +0200 | |
172 | +++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c 2010-06-09 15:21:35.000000000 +0200 | |
173 | @@ -0,0 +1,22 @@ | |
174 | +/* This testcase is part of GDB, the GNU debugger. | |
175 | + | |
176 | + Copyright 2010 Free Software Foundation, Inc. | |
177 | + | |
178 | + This program is free software; you can redistribute it and/or modify | |
179 | + it under the terms of the GNU General Public License as published by | |
180 | + the Free Software Foundation; either version 3 of the License, or | |
181 | + (at your option) any later version. | |
182 | + | |
183 | + This program is distributed in the hope that it will be useful, | |
184 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
185 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
186 | + GNU General Public License for more details. | |
187 | + | |
188 | + You should have received a copy of the GNU General Public License | |
189 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
190 | + | |
191 | +int | |
192 | +main (void) | |
193 | +{ | |
194 | + return 0; | |
195 | +} | |
196 | --- /dev/null 2010-06-08 20:35:46.800278452 +0200 | |
197 | +++ gdb-7.1/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp 2010-06-09 15:26:21.000000000 +0200 | |
198 | @@ -0,0 +1,42 @@ | |
199 | +# Copyright 2010 Free Software Foundation, Inc. | |
200 | + | |
201 | +# This program is free software; you can redistribute it and/or modify | |
202 | +# it under the terms of the GNU General Public License as published by | |
203 | +# the Free Software Foundation; either version 3 of the License, or | |
204 | +# (at your option) any later version. | |
205 | +# | |
206 | +# This program is distributed in the hope that it will be useful, | |
207 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
208 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
209 | +# GNU General Public License for more details. | |
210 | +# | |
211 | +# You should have received a copy of the GNU General Public License | |
212 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
213 | + | |
214 | +# This test can only be run on targets which support DWARF-2 and use gas. | |
215 | +# For now pick a sampling of likely targets. | |
216 | +if {![istarget *-*-linux*] | |
217 | + && ![istarget *-*-gnu*] | |
218 | + && ![istarget *-*-elf*] | |
219 | + && ![istarget *-*-openbsd*] | |
220 | + && ![istarget arm-*-eabi*] | |
221 | + && ![istarget powerpc-*-eabi*]} { | |
222 | + return 0 | |
223 | +} | |
224 | + | |
225 | +if {![istarget x86_64-*]} { | |
226 | + return 0 | |
227 | +} | |
228 | + | |
229 | +set testfile "rh-dwarf4-x86_64" | |
230 | +set srcfile ${testfile}.S | |
231 | +set executable ${testfile}.x | |
232 | +set binfile ${objdir}/${subdir}/${executable} | |
233 | + | |
234 | +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { | |
235 | + return -1 | |
236 | +} | |
237 | + | |
238 | +clean_restart $executable | |
239 | + | |
240 | +gdb_test "ptype main" {type = int \(void\)} |