public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][gdb] Fix warning in print_one_insn::ez80-adl
@ 2022-06-02 15:44 Tom de Vries
  2022-06-04  9:12 ` [committed][gdb] " Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2022-06-02 15:44 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running selftest print_one_insn::ez80-adl we run into this warning:
...
Running selftest print_one_insn::ez80-adl.
warning: Unable to determine inferior's software breakpoint type: couldn't
  find `_break_handler' function in inferior. Will be used default software \
  breakpoint instruction RST 0x08.
...

Fix this by explicitly handling bfd_arch_z80 in print_one_insn_test.

Tested on x86_64-linux.

Any comments?

Thanks,
- Tom

[gdb] Fix warning in print_one_insn::ez80-adl

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

diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c
index ccb60a0bc87..ff3c53c6104 100644
--- a/gdb/disasm-selftests.c
+++ b/gdb/disasm-selftests.c
@@ -86,6 +86,13 @@ print_one_insn_test (struct gdbarch *gdbarch)
       if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601)
 	return;
       goto generic_case;
+    case bfd_arch_z80:
+      {
+	int bplen;
+	insn = gdbarch_sw_breakpoint_from_kind (gdbarch, 0x0008, &bplen);
+	len = bplen;
+      }
+      break;
     case bfd_arch_i386:
       {
 	const struct bfd_arch_info *info = gdbarch_bfd_arch_info (gdbarch);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-04  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 15:44 [PATCH][gdb] Fix warning in print_one_insn::ez80-adl Tom de Vries
2022-06-04  9:12 ` [committed][gdb] " Tom de Vries

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).