public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb] Enable some more print_one_insn selftests
Date: Mon,  6 Jun 2022 17:27:57 +0000 (GMT)	[thread overview]
Message-ID: <20220606172757.3A3823841446@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4ab19f4c9b3c838cd904a501b77148a459420b4c

commit 4ab19f4c9b3c838cd904a501b77148a459420b4c
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Jun 6 19:27:46 2022 +0200

    [gdb] Enable some more print_one_insn selftests
    
    In print_one_insn_test we have this cluster of skipped tests:
    ...
        case bfd_arch_ia64:
        case bfd_arch_mep:
        case bfd_arch_mips:
        case bfd_arch_tic6x:
        case bfd_arch_xtensa:
          return;
    ...
    
    Enable some of these, and document in more detail why they're enabled or
    skipped.
    
    Likewise, document bfd_arch_or1k because it's an odd case.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/disasm-selftests.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c
index 266745d01c7..4f5667bc4e2 100644
--- a/gdb/disasm-selftests.c
+++ b/gdb/disasm-selftests.c
@@ -50,11 +50,29 @@ print_one_insn_test (struct gdbarch *gdbarch)
       len = sizeof (arm_insn);
       break;
     case bfd_arch_ia64:
+      /* We get:
+	 internal-error: gdbarch_sw_breakpoint_from_kind:
+	 Assertion `gdbarch->sw_breakpoint_from_kind != NULL' failed.  */
+      return;
     case bfd_arch_mep:
+      /* Disassembles as '*unknown*' insn, then len self-check fails.  */
+      return;
     case bfd_arch_mips:
+      if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_mips16)
+	/* Disassembles insn, but len self-check fails.  */
+	return;
+      goto generic_case;
     case bfd_arch_tic6x:
+      /* Disassembles as '<undefined instruction 0x56454314>' insn, but len
+	 self-check passes, so let's allow it.  */
+      goto generic_case;
     case bfd_arch_xtensa:
+      /* Disassembles insn, but len self-check fails.  */
       return;
+    case bfd_arch_or1k:
+      /* Disassembles as '*unknown*' insn, but len self-check passes, so let's
+	 allow it.  */
+      goto generic_case;
     case bfd_arch_s390:
       /* nopr %r7 */
       static const gdb_byte s390_insn[] = {0x07, 0x07};


                 reply	other threads:[~2022-06-06 17:27 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=20220606172757.3A3823841446@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).