]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-disassembler-options.exp
CommitLineData
1d506c26 1# Copyright 2014-2024 Free Software Foundation, Inc.
65b48a81
PB
2
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.
7#
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.
12#
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/>.
15
16# This file is part of the gdb testsuite.
17
18# This test exercises set/show disassembler-options results are preserved
19# across multiple set architecture calls.
20
73c06197 21require {istarget "powerpc*-*-*"}
65b48a81
PB
22
23gdb_exit
24gdb_start
25
26set option "power9"
27set arch1 "rs6000:6000"
28set arch2 "powerpc:common64"
29
30gdb_test "set architecture $arch1" \
f4a0f710 31 "The target architecture is set to \"$arch1\"\." \
65b48a81
PB
32 "set architecture $arch1"
33
34gdb_test_no_output "set disassembler-options"
35gdb_test "show disassembler-options" \
36 "The current disassembler options are ''.*" \
37 "show NULL disassembler-options"
38
39gdb_test_no_output "set disassembler-options $option"
40gdb_test "show disassembler-options" \
41 "The current disassembler options are '$option'.*" \
99066782 42 "show disassembler-options $option after set arch $arch1"
65b48a81
PB
43
44# Change architectures and verify the disassembler options have been preserved.
45
46gdb_test "set architecture $arch2" \
f4a0f710 47 "The target architecture is set to \"$arch2\"\." \
65b48a81
PB
48 "set architecture $arch2"
49
50gdb_test "show disassembler-options" \
51 "The current disassembler options are '$option'.*" \
99066782 52 "show disassembler-options $option after set arch $arch2"
65b48a81 53