1 # Copyright
2014-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 # This file is part of the gdb testsuite.
18 # This test exercises
set/show disassembler
-options results are preserved
19 # across multiple
set architecture calls.
21 require
{istarget
"powerpc*-*-*"}
27 set arch1
"rs6000:6000"
28 set arch2
"powerpc:common64"
30 gdb_test
"set architecture $arch1" \
31 "The target architecture is set to \"$arch1\"\." \
32 "set architecture $arch1"
34 gdb_test_no_output
"set disassembler-options"
35 gdb_test
"show disassembler-options" \
36 "The current disassembler options are ''.*" \
37 "show NULL disassembler-options"
39 gdb_test_no_output
"set disassembler-options $option"
40 gdb_test
"show disassembler-options" \
41 "The current disassembler options are '$option'.*" \
42 "show disassembler-options $option after set arch $arch1"
44 # Change architectures and verify the disassembler options have been preserved.
46 gdb_test
"set architecture $arch2" \
47 "The target architecture is set to \"$arch2\"\." \
48 "set architecture $arch2"
50 gdb_test
"show disassembler-options" \
51 "The current disassembler options are '$option'.*" \
52 "show disassembler-options $option after set arch $arch2"