From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 0F3B7385801A for ; Wed, 12 May 2021 18:21:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F3B7385801A Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BD075335C8C; Wed, 12 May 2021 18:21:57 +0000 (UTC) Date: Wed, 12 May 2021 14:21:57 -0400 From: Mike Frysinger To: Faraz Shahbazker Cc: gdb-patches@sourceware.org, "Maciej W . Rozycki" , Chao-ying Fu Subject: Re: [PATCH 2/2] [pr gdb/19447] sim: mips: Add shadow mappings for 32-bit memory address space Message-ID: Mail-Followup-To: Faraz Shahbazker , gdb-patches@sourceware.org, "Maciej W . Rozycki" , Chao-ying Fu References: <20210504232117.896136-1-fshahbazker@wavecomp.com> <20210504232117.896136-2-fshahbazker@wavecomp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210504232117.896136-2-fshahbazker@wavecomp.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 12 May 2021 18:22:00 -0000 On 05 May 2021 04:51, Faraz Shahbazker wrote: > --- a/sim/mips/interp.c > +++ b/sim/mips/interp.c > @@ -438,6 +438,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, > /* memory alias K1BASE@1,K1SIZE%MEMSIZE,K0BASE */ > sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx%%0x%lx,0x%0x", > K1BASE, K1SIZE, (long)mem_size, K0BASE); > + if (WITH_TARGET_WORD_BITSIZE == 64) > + sim_do_commandf (sd, "memory alias 0x%lx,0x%lx,0x%lx", > + (K0BASE), (long)mem_size, EXTENDED(K0BASE)); instead of using %lx & casting to (long), use sim's PRIx* for the format. sim_do_commandf (sd, "memory alias 0x%x,0x%" PRIxTA ",0x%" PRIxTW, K0BASE, mem_size, EXTENDED(K0BASE)); -mike