aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-09-13 20:16:36 +0200
committerTom de Vries <tdevries@suse.de>2021-09-13 20:16:36 +0200
commitcad152f2211282b938f11b021f2acf3df517557e (patch)
tree04f657bc8a3d0a66a0e5478454ed0147b1532b17 /opcodes
parente68b7db18cf127d054bebe9d6b28c0bfeadaf18a (diff)
downloadgdb-cad152f2211282b938f11b021f2acf3df517557e.zip
gdb-cad152f2211282b938f11b021f2acf3df517557e.tar.gz
gdb-cad152f2211282b938f11b021f2acf3df517557e.tar.bz2
[gdb/tdep] Reset force_thumb in parse_arm_disassembler_options
With a gdb build with --enable-targets=all, we have 2 arch-specific failures in selftest print_one_insn: ... $ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \ | grep "Self test failed: arch " Self test failed: arch armv8.1-m.main: self-test failed at \ disasm-selftests.c:165 Self test failed: arch arm_any: self-test failed at disasm-selftests.c:165 $ ... During the first failed test, force_thumb is set to true, and remains so until and during the second test, which causes the second failure. Fix this by resetting force_thumb to false in parse_arm_disassembler_options, such that we get just one failure: ... $ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \ | grep "Self test failed: arch " Self test failed: arch armv8.1-m.main: self-test failed at \ disasm-selftests.c:165 $ ... Tested on x86_64-linux.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/arm-dis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index faabd42..78efb81 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -11613,6 +11613,7 @@ parse_arm_disassembler_options (const char *options)
{
const char *opt;
+ force_thumb = false;
FOR_EACH_DISASSEMBLER_OPTION (opt, options)
{
if (startswith (opt, "reg-names-"))