]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / missing-sig-type.exp
CommitLineData
1d506c26 1# Copyright 2013-2024 Free Software Foundation, Inc.
4f22ed5c
DE
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15load_lib dwarf.exp
16
17# This test can only be run on targets which support DWARF-2 and use gas.
ce8d533e 18require dwarf2_support
4f22ed5c 19
0b94d2b9 20require allow_cplus_tests
4f22ed5c 21
d1c8a76d 22standard_testfile main.c -dw4.S
4f22ed5c
DE
23
24# Make some DWARF for the test.
25set asm_file [standard_output_file $srcfile2]
26Dwarf::assemble $asm_file {
6c9e2db4 27 cu {} {
4f22ed5c
DE
28 compile_unit {} {
29 declare_labels typedef_label
30
31 # This signature is intentionally wrong.
32 typedef_label: typedef {
33 {name foo}
34 {type 0xee22334455667788 ref_sig8 }
35 }
36 }
37 }
38
6c9e2db4 39 tu {} 0x1122334455667788 the_type {
4f22ed5c
DE
40 type_unit {} {
41 the_type: base_type {
42 {name int}
43 {encoding @DW_ATE_signed}
44 {byte_size 4 sdata}
45 }
46 }
47 }
48}
49
5b362f04 50if { [prepare_for_testing "failed to prepare" ${testfile} \
e0c0f156 51 [list $srcfile $asm_file] {nodebug}] } {
4f22ed5c
DE
52 return -1
53}
54
4f22ed5c 55gdb_test "ptype foo" "type = <unknown type .*>"