]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.arch/arm-disassembler-options.exp
include, libctf: improve documentation
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / arm-disassembler-options.exp
1 # Copyright 2014-2024 Free Software Foundation, Inc.
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
21 require {istarget "arm*-*-*"}
22
23 gdb_exit
24 gdb_start
25
26 set option "reg-names-gcc,force-thumb"
27 set arch1 "armv2"
28 set arch2 "armv5"
29
30 gdb_test "set architecture $arch1" \
31 "The target architecture is set to \"$arch1\"\." \
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'.*" \
42 "show disassembler-options $option"
43
44 # Change architectures and verify the disassembler options have been preserved.
45
46 gdb_test "set architecture $arch2" \
47 "The target architecture is set to \"$arch2\"\." \
48 "set architecture $arch2"
49
50 gdb_test "show disassembler-options" \
51 "The current disassembler options are '$option'.*" \
52 "show disassembler-options $option, modified architecture"
53