From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wA39AvbenmLZIQsAWB0awg (envelope-from ) for ; Tue, 07 Jun 2022 01:15:34 -0400 Received: by simark.ca (Postfix, from userid 112) id F27A21E222; Tue, 7 Jun 2022 01:15:33 -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=qlPd3qXs; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 8D0731E00D for ; Tue, 7 Jun 2022 01:15:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C0C31382CF24 for ; Tue, 7 Jun 2022 05:15:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0C31382CF24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654578932; bh=AQG150mEXC6fvFxTsnAleKhyYSBcq7xWNw1jgx56khQ=; 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=qlPd3qXshiDb5L2m/dPdMOEazeUDyqOavkJFYD0tGfnrytD3j1lo26kVICuCuQvbK 5aaiSEZB8C8TXZZIDWBvrfRXQbfJH16gMfzLfeQrEZgz5vMdt1DYp90Eu097MysyIQ TYlPk09XedFmAjgZJbXePl9orhIDRdC4kd3gEAIw= 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 To: 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-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: Sergei Trofimovich , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --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--