From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id CA2A5382CF09 for ; Tue, 7 Jun 2022 05:15:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CA2A5382CF09 Received: by smtp.gentoo.org (Postfix, from userid 559) id 1D5CA341444; Tue, 7 Jun 2022 05:15:09 +0000 (UTC) Date: Tue, 7 Jun 2022 01:15:48 -0400 From: Mike Frysinger To: Sergei Trofimovich Cc: gdb-patches@sourceware.org, Sergei Trofimovich Subject: Re: [PATCH] sim: fix BFD_VMA format arguments on 32-bit hosts Message-ID: Mail-Followup-To: Sergei Trofimovich , gdb-patches@sourceware.org, Sergei Trofimovich References: <20220521075917.1353792-1-slyich@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6lOgDxpouOrwSfRj" Content-Disposition: inline In-Reply-To: <20220521075917.1353792-1-slyich@gmail.com> X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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: Tue, 07 Jun 2022 05:15:13 -0000 --6lOgDxpouOrwSfRj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On 21 May 2022 08:59, Sergei Trofimovich via Gdb-patches wrote: > --- a/sim/cris/sim-if.c > +++ b/sim/cris/sim-if.c these BFD_VMA_FMT changes look fine > --- a/sim/m32c/syscalls.c > +++ b/sim/m32c/syscalls.c > > - printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec, > - tv.tv_usec, tvaddr); > + printf ("gettimeofday: %lld sec %lld usec to 0x%x\n", > + (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr); > > --- a/sim/rx/syscalls.c > +++ b/sim/rx/syscalls.c > > - printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec, > - tv.tv_usec, tvaddr); > + printf ("gettimeofday: %lld sec %lld usec to 0x%x\n", > + (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr); i think using explicit 64-bit types (i.e. int64_t) rather than long long would be better. it's what we used in other places so far (like the sim callback APIs). -mike --6lOgDxpouOrwSfRj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmKe3v4ACgkQQWM7n+g3 9YGwXBAAgzKKlKdu+hOQnzb0MV8fdy6bcKNDMrt55R35qypSrSNJrSaxBoJc8eFe xeBjufMwGWP0w3C9F7pZE20XfwmcT7gShJVBq7xFVluzIRR5njKDFRa9GrqNjBPE vJIXXJC2eP7myKG2tnFVZmVIIbAUKcWyicmIkpYr3GJ9pUTixL10yOvyw+YSywk9 Zfy7WlzucVUulmd0y8ApodhlIIYsSdqtRi6ZK26DxgvRuZdAVe5WtZK80AiHiC1m 6k1hEujk6aHIGRYFDlue6M1WX6W2fNpmbeudvck48Z3SpcAx009M1AMGcNCou+ox e0iQpHjeWfQa5DSJaIZ0ZMPfjJPpHK8XDh7+DloWpSuCTdiGd8DywuYfiRFbKZgj HmfZv8jKMABflcD42GnFpYSmmN2gUODVvn3UIIiSMzFKLu6rh9tKOdqdQCE/jKB/ hqX2rmxFD9UM3zfHJtHqNHvbLv729Yo+TX7JNXfcSdyCdlAw26FhcG5ddye+1iMS qhvZUTxO1M4y/gtM5+qTN/9mKVMTqansnZdP0boBOvatrR/qhOvREArP0bE0l/Hy i2zDqaxSxByIOj4Ndc6HtAA/pFaBT9SpAqB8RDKE5fSGhVv5ilx+7Te5RVeOTGr+ FNlKI9YG3KIuihSRzbdWBEIZofgF+Kq4gc8j1TYN3/BlL2kybPk= =VtRt -----END PGP SIGNATURE----- --6lOgDxpouOrwSfRj--