[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / multidictionary.exp
blob5588ef214411ae40221a212c8a04964c04f240dd
1 # Copyright 2019 Free Software Foundation, Inc.
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.
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.
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/>.
16 # A test of multi-language dictionaries, a solution to symtab/23010 et al.
18 load_lib dwarf.exp
20 # This test can only be run on targets which support DWARF.
21 if {![dwarf2_support]} {
22 return 0
25 standard_testfile main.c .S
27 # Create the DWARF. This is derived from the reproducer in the bug
28 # mentioned above. This DIE tree is typical of compilations wtih
29 # LTO enabled.
31 set asm_file [standard_output_file $srcfile2]
32 Dwarf::assemble $asm_file {
33 declare_labels D45d9 D5079 D5080 D50a9 D50af D5ab2 D5ac2 D5ace D5acf
34 declare_labels D2135f D2216a D22171 D226c4 D226ca D244ca \
35 D245da D245e6
36 declare_labels D41c21 D42025 D42045 D42038 D42045 D420b5
38 cu {} {
39 D45d9: compile_unit {
40 {language @DW_LANG_C_plus_plus}
41 {name "SerialPortUtils.cpp"}
42 } {
43 D5079: base_type {
44 {byte_size 1 sdata}
45 {encoding @DW_ATE_unsigned}
46 {name "char"}
49 D5080: const_type {
50 {type :$D5079}
53 D50a9: pointer_type {
54 {byte_size 4 sdata}
55 {type :$D5080}
58 D50af: const_type {
59 {type :$D50a9}
62 D5ab2: subprogram {
63 {external 1 flag}
64 {linkage_name "_Z18SerialSyncWriteStrPKc"}
65 } {
66 D5ac2: formal_parameter {
67 {name "msg"}
68 {type :$D50af}
70 D5ace: lexical_block {} {
71 D5acf: DW_TAG_variable {
72 {name "p"}
73 {type :$D50a9}
80 cu {} {
81 D2135f: compile_unit {
82 {language @DW_LANG_C_plus_plus}
83 {name "Main.cpp"}
84 } {
85 D2216a: base_type {
86 {byte_size 1 sdata}
87 {encoding @DW_ATE_unsigned_char}
88 {name "char"}
91 D22171: const_type {
92 {type :$D2216a}
95 D226c4: pointer_type {
96 {byte_size 4 sdata}
97 {type :$D22171}
100 D226ca: const_type {
101 {type :$D226c4}
104 D245da: subprogram {
105 {name "PrintPanicMsg"}
107 D245e6: formal_parameter {
108 {name "msg"}
109 {type :$D226ca}
115 cu {} {
116 D41c21: compile_unit {
117 {language @DW_LANG_C99}
118 {name "<artificial>"}
120 D42025: subprogram {
121 {abstract_origin %$D245da}
122 {low_pc 0x80b60 addr}
123 {high_pc 0x6c data4}
125 D42038: formal_parameter {
126 {abstract_origin %$D245e6}
129 D42045: inlined_subroutine {
130 {abstract_origin %$D5ab2}
131 {low_pc 0x8060 addr}
132 {high_pc 0xc data4}
134 D420b5: formal_parameter {
135 {abstract_origin %$D5ac2}
143 # Build the test executable.
144 if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \
145 == -1} {
146 return -1
149 # We force the DIEs above to be read in via "-readnow".
150 gdb_spawn_with_cmdline_opts "-readnow"
151 gdb_load $binfile
153 # All we need to do is check whether GDB is alive. Without
154 # multidictionaries, it will either crash, assert, or throw an
155 # internal_error.
156 gdb_test "p 1" "= 1" "GDB is alive"