From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YPzBCffamGK47wkAWB0awg (envelope-from ) for ; Thu, 02 Jun 2022 11:44:55 -0400 Received: by simark.ca (Postfix, from userid 112) id 244E81E221; Thu, 2 Jun 2022 11:44:55 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=P9oqXTKE; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AC2641E143 for ; Thu, 2 Jun 2022 11:44:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 55D993954C4A for ; Thu, 2 Jun 2022 15:44:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55D993954C4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654184694; bh=ogkay6vzKJpaeWndWrLKGwyZQqHncPBzja/ddZ/CTOc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=P9oqXTKElXSklw0DMOVlK3FN9k3sNe58RPZPB/MkrGH8rz0sQaQ7mJBPXb9T+sYKi PiasgB9mPs78UuBLqz1rA0c7sSoY3/MP7iuyZwO39KNvBCS9i9jVOIIZzzl5Z1gsUp YaARTktseguOB3WuMz5G4qkhx9zotMNAnzJ8hZi8= 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 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-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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "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);