From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/tdep] Reset force_thumb in parse_arm_disassembler_options
Date: Mon, 13 Sep 2021 20:17:49 +0200 [thread overview]
Message-ID: <20210913181748.GA15416@delia.home> (raw)
Hi,
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.
Committed to trunk, as obvious.
Thanks,
- Tom
[gdb/tdep] Reset force_thumb in parse_arm_disassembler_options
---
opcodes/arm-dis.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index faabd42b5b3..78efb815147 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-"))
reply other threads:[~2021-09-13 18:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210913181748.GA15416@delia.home \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox