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
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.
27 "set tdesc filename $srcdir/$subdir/arc-tdesc-cpu.xml" \
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.
36 set msg "setting HS architecture"
37 gdb_test_multiple $cmd $msg {
38 -re "Unrecognised disassembler CPU option: HS.*$gdb_prompt" {
41 -re "^$cmd\r\n\\s*$hex:\\s+Cannot access memory at address $hex\r\n$gdb_prompt"