From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id e3lDBhlJVWPIvQ8AWB0awg (envelope-from ) for ; Sun, 23 Oct 2022 10:00:57 -0400 Received: by simark.ca (Postfix, from userid 112) id 085FB1E112; Sun, 23 Oct 2022 10:00:57 -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=eu0PT/3d; 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 AB4BC1E0D3 for ; Sun, 23 Oct 2022 10:00:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C292A3850866 for ; Sun, 23 Oct 2022 14:00:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C292A3850866 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666533655; bh=ZpDcdj648UpilECKEhtNf2uEPtMvo9PdRVQ0ogBsb9g=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=eu0PT/3dnaVT7ZMb+SkSc8KxsiYqOiAInBEhMAnRhARTGx6h7xcHkeH+3B3ToJIWr zusxLt82d01aI8hw+vUOclDJKqzN+GUUSXdr+3S+quXkT/MOvE51VWo317AIy1c36k bKI07dKBeqSTlk0almNin6NzM25iNarkgyoodubI= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id CA263385116D for ; Sun, 23 Oct 2022 14:00:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA263385116D Received: by smtp.gentoo.org (Postfix, from userid 559) id BE2283410BF; Sun, 23 Oct 2022 14:00:34 +0000 (UTC) Date: Sun, 23 Oct 2022 18:31:08 +0545 To: Andrew Burgess Subject: Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF Message-ID: Mail-Followup-To: Andrew Burgess , Jan-Benedict Glaw , Tsukasa OI , Stephane Carrez , "Frank Ch . Eigler" , gdb-patches@sourceware.org References: <9ee0350e33400397851bb55c129a675519e5f174.1665038133.git.research_trasio@irq.a4lg.com> <8735bucu5p.fsf@redhat.com> <20221012082940.44hq4m7qkudpvyl5@lug-owl.de> <87wn95bctu.fsf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JT/WBjtmNtTEMELi" Content-Disposition: inline In-Reply-To: <87wn95bctu.fsf@redhat.com> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: "Frank Ch . Eigler" , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --JT/WBjtmNtTEMELi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On 12 Oct 2022 10:39, Andrew Burgess wrote: > --- a/sim/ppc/corefile.c > +++ b/sim/ppc/corefile.c > @@ -292,8 +292,8 @@ core_map_find_mapping(core_map *map, > mapping = mapping->next; > } > if (abort) > - error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%x cia=0x%x\n", > - addr, nr_bytes, processor, cia); > + error("core_find_mapping() - access to unmaped address, attach a default map to handle this - addr=0x%x nr_bytes=0x%x processor=0x%p cia=0x%x\n", no 0x before %p > + addr, nr_bytes, (void *) processor, cia); why do you need (void*) cast ? %p takes pointer of any type. > --- a/sim/ppc/emul_chirp.c > +++ b/sim/ppc/emul_chirp.c > @@ -1509,7 +1509,7 @@ map_over_chirp_note(bfd *image, > return; > /* check the name field */ > if (head.namesz > sizeof(name)) { > - error("chirp: note name too long (%d > %d)\n", (int)head.namesz, sizeof(name)); > + error("chirp: note name too long (%d > %d)\n", (int)head.namesz, (int)sizeof(name)); please fix the format string instead of casting to random types. sizeof uses %zu, not %d. -mike --JT/WBjtmNtTEMELi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmNVN5AACgkQQWM7n+g3 9YERZw//U0UwaBJB3tWGB5kgR3gAwq4aS75ebicxVNn2NZn4Uyn0uVz30V9osprY 1KPVkIsm1jUnT3B+unypiUPrFg9WNyKVnbGc9RhHIXAEAwxQM+SfNSwjRehKIheQ ffEHSpJHAAbvxk8XUnm85D/viJ/4iOQ7QCLlBGBaVbowLMXFSpfC3Mp1/FNVbQmt LckwSFs0inhPaYCP0NKapyWfFC4SOhxYZFhMSac7FESkpMY/ca3wcT5WMiskaLSz nvZBTa2PW99xDowQXVe7goSUjW4+kNudLLkMOC1T4bNOZLkdRxe0TgSCb6kWy082 qNxO7mlQZGrG9NYjTe0uU3rfynadgp+JcRGmZ7uElklMa3R0yjv8RxbinOTXXBqf BTQ94sQZ6LJefPSuDKCFb4nTkXCmG4nEvma7KwNdr0ywtV37VIjU67seKxSBoqPm 3L1ip8IIlTfDw/mTvIrJpzSgDTlQGxP8FOAOqXnxs3UQn9Wm4jTBkeiBaEx2YRK7 hspyYhfoWgoo1Q3FE6nu5PD00pp0Yd6/TxTh22Xeyadokwm3TTRCXn/7W8F7TeS3 RfvsL0rIs8KiAH2O2yA5FoRFg1J4+vd/uDuGbI2JGIRo+79MOS8tH8AOH929ffNW inVuXGqwJP71Ewx4yBtd/YXiZj4xqZ8qHdEutjmFbqOpXyYVIds= =9AVN -----END PGP SIGNATURE----- --JT/WBjtmNtTEMELi--