1 # Copyright 2017-2023 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 if {[gdb_skip_xml_test]} {
17 unsupported "arc-tdesc-cpu.exp"
23 # Test whether it is OK to have `arc:HS` in the target description
24 # architecture. `HS` is a valid BFD architecture name, however the
25 # disassembler doesn't accept it as a CPU name. This test checks that GDB
26 # doesn't pass architecture from the target description directly to the
27 # disassembler and instead uses one of the valid CPU names.
30 "set tdesc filename $srcdir/$subdir/arc-tdesc-cpu.xml" \
32 "set tdesc filename \$srcdir/$subdir/arc-tdesc-cpu.xml"
34 # An error message is emitted by the disassembler, therefore it is not shown
35 # unless the disassembler is actually invoked. Address "0" is not invalid,
36 # but that doesn't matter for this test case, because it is only the
37 # disassembler error message that is interesting.
39 set msg "setting HS architecture"
40 gdb_test_multiple $cmd $msg {
41 -re "Unrecognised disassembler CPU option: HS.*$gdb_prompt" {
44 -re "^$cmd\r\n\\s*$hex:\\s+Cannot access memory at address $hex\r\n$gdb_prompt"