From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 4913E395A073 for ; Thu, 2 Jun 2022 15:44:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4913E395A073 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7927A21B9D for ; Thu, 2 Jun 2022 15:44:28 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 662E113AC8 for ; Thu, 2 Jun 2022 15:44:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cDi+F9zamGJSfQAAMHmgww (envelope-from ) for ; Thu, 02 Jun 2022 15:44:28 +0000 Date: Thu, 2 Jun 2022 17:44:27 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb] Fix warning in print_one_insn::ez80-adl Message-ID: <20220602154425.GA7631@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 15:44:30 -0000 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);