* gdb.gdb/python-selftest.exp: New file.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / missing-sig-type.exp
CommitLineData
4f22ed5c
DE
1# Copyright 2013 Free Software Foundation, Inc.
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
24standard_testfile main.c missing-sig-type-dw4.S
25
26# Make some DWARF for the test.
27set asm_file [standard_output_file $srcfile2]
28Dwarf::assemble $asm_file {
29 cu 0 4 8 {
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
41 tu 0 4 8 0x1122334455667788 the_type {
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
52if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
53 object {nodebug}] != ""} {
54 return -1
55}
56
57if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
58 return -1
59}
60
61if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \
62 "${binfile}" executable {c++}] != ""} {
63 return -1
64}
65
66clean_restart ${testfile}
67
68gdb_test "ptype foo" "type = <unknown type .*>"
This page took 0.038406 seconds and 4 git commands to generate.