GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
[binutils-gdb.git] / gdb / testsuite / gdb.arch / arc-tdesc-cpu.exp
blob5ff513858a35f12677a00c173e3bfca4b35c11ce
1 # Copyright 2017-2024 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 require allow_xml_test
18 gdb_start
20 # Test whether it is OK to have `arc:HS` in the target description
21 # architecture. `HS` is a valid BFD architecture name, however the
22 # disassembler doesn't accept it as a CPU name. This test checks that GDB
23 # doesn't pass architecture from the target description directly to the
24 # disassembler and instead uses one of the valid CPU names.
26 gdb_test \
27 "set tdesc filename $srcdir/$subdir/arc-tdesc-cpu.xml" \
28 ".*" \
29 "set tdesc filename \$srcdir/$subdir/arc-tdesc-cpu.xml"
31 # An error message is emitted by the disassembler, therefore it is not shown
32 # unless the disassembler is actually invoked. Address "0" is not invalid,
33 # but that doesn't matter for this test case, because it is only the
34 # disassembler error message that is interesting.
35 set cmd "x /i 0"
36 set msg "setting HS architecture"
37 gdb_test_multiple $cmd $msg {
38 -re "Unrecognised disassembler CPU option: HS.*$gdb_prompt" {
39 fail $msg
41 -re "^$cmd\r\n\\s*$hex:\\s+Cannot access memory at address $hex\r\n$gdb_prompt"
43 pass $msg