Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / missing-sig-type.exp
CommitLineData
88b9d363 1# Copyright 2013-2022 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.
18if {![dwarf2_support]} {
19 return 0
20}
21
22if { [skip_cplus_tests] } { continue }
23
d1c8a76d 24standard_testfile main.c -dw4.S
4f22ed5c
DE
25
26# Make some DWARF for the test.
27set asm_file [standard_output_file $srcfile2]
28Dwarf::assemble $asm_file {
6c9e2db4 29 cu {} {
4f22ed5c
DE
30 compile_unit {} {
31 declare_labels typedef_label
32
33 # This signature is intentionally wrong.
34 typedef_label: typedef {
35 {name foo}
36 {type 0xee22334455667788 ref_sig8 }
37 }
38 }
39 }
40
6c9e2db4 41 tu {} 0x1122334455667788 the_type {
4f22ed5c
DE
42 type_unit {} {
43 the_type: base_type {
44 {name int}
45 {encoding @DW_ATE_signed}
46 {byte_size 4 sdata}
47 }
48 }
49 }
50}
51
5b362f04 52if { [prepare_for_testing "failed to prepare" ${testfile} \
e0c0f156 53 [list $srcfile $asm_file] {nodebug}] } {
4f22ed5c
DE
54 return -1
55}
56
4f22ed5c 57gdb_test "ptype foo" "type = <unknown type .*>"
This page took 0.994514 seconds and 4 git commands to generate.