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
4 +/* This testcase is part of GDB, the GNU debugger.
6 + Copyright 2010 Free Software Foundation, Inc.
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.
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.
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/>. */
21 + .file "rh-dwarf4-x86_64.c"
22 + .section .debug_abbrev,"",@progbits
24 + .section .debug_info,"",@progbits
26 + .section .debug_line,"",@progbits
31 + .type main, @function
34 + .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c"
35 + # gdb.dwarf2/rh-dwarf4-x86_64.c:20
40 + .cfi_def_cfa_offset 16
43 + .cfi_def_cfa_register 6
44 + # gdb.dwarf2/rh-dwarf4-x86_64.c:21
47 + # gdb.dwarf2/rh-dwarf4-x86_64.c:22
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)
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
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)
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)
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)
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
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
156 + .quad .Ltext0 # Address
157 + .quad .Letext0-.Ltext0 # Length
160 + .section .debug_str,"MS",@progbits,1
164 + .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
166 + .string "gdb.dwarf2/rh-dwarf4-x86_64.c"
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
174 +/* This testcase is part of GDB, the GNU debugger.
176 + Copyright 2010 Free Software Foundation, Inc.
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.
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.
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/>. */
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
199 +# Copyright 2010 Free Software Foundation, Inc.
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.
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.
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/>.
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*]} {
225 +if {![istarget x86_64-*]} {
229 +set testfile "rh-dwarf4-x86_64"
230 +set srcfile ${testfile}.S
231 +set executable ${testfile}.x
232 +set binfile ${objdir}/${subdir}/${executable}
234 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
238 +clean_restart $executable
240 +gdb_test "ptype main" {type = int \(void\)}