]>
Commit | Line | Data |
---|---|---|
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 | 21 | require {istarget "powerpc*-*-*"} |
65b48a81 PB |
22 | |
23 | gdb_exit | |
24 | gdb_start | |
25 | ||
26 | set option "power9" | |
27 | set arch1 "rs6000:6000" | |
28 | set arch2 "powerpc:common64" | |
29 | ||
30 | gdb_test "set architecture $arch1" \ | |
f4a0f710 | 31 | "The target architecture is set to \"$arch1\"\." \ |
65b48a81 PB |
32 | "set architecture $arch1" |
33 | ||
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" | |
38 | ||
39 | gdb_test_no_output "set disassembler-options $option" | |
40 | gdb_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 | ||
46 | gdb_test "set architecture $arch2" \ | |
f4a0f710 | 47 | "The target architecture is set to \"$arch2\"\." \ |
65b48a81 PB |
48 | "set architecture $arch2" |
49 | ||
50 | gdb_test "show disassembler-options" \ | |
51 | "The current disassembler options are '$option'.*" \ | |
99066782 | 52 | "show disassembler-options $option after set arch $arch2" |
65b48a81 | 53 |