Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright 2013-2016 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/>. | |
15 | load_lib dwarf.exp | |
16 | ||
17 | # This test can only be run on targets which support DWARF-2 and use gas. | |
18 | if {![dwarf2_support]} { | |
19 | return 0 | |
20 | } | |
21 | ||
22 | if { [skip_cplus_tests] } { continue } | |
23 | ||
24 | standard_testfile main.c missing-sig-type-dw4.S | |
25 | ||
26 | # Make some DWARF for the test. | |
27 | set asm_file [standard_output_file $srcfile2] | |
28 | Dwarf::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 | ||
e0c0f156 AA |
52 | if { [prepare_for_testing ${testfile}.exp ${testfile} \ |
53 | [list $srcfile $asm_file] {nodebug}] } { | |
4f22ed5c DE |
54 | return -1 |
55 | } | |
56 | ||
4f22ed5c | 57 | gdb_test "ptype foo" "type = <unknown type .*>" |