From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EWMQNBv2918DIwAAWB0awg (envelope-from ) for ; Fri, 08 Jan 2021 01:05:15 -0500 Received: by simark.ca (Postfix, from userid 112) id C64251E99A; Fri, 8 Jan 2021 01:05:15 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 63D921E4F4; Fri, 8 Jan 2021 01:05:15 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDDAB3971C35; Fri, 8 Jan 2021 06:05:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDDAB3971C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610085914; bh=p4FHJiJYsUpbYE2ghQBKkNBAffrEjq/qe2Fd9Z+8YUc=; 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=r4SSYYfCN4ImEg1QpM5n1VLZe2PzqTDFAE3WgYMEFOXRJYMJAXuQ1U4C4ZyKX3ihu dIBvSr/QPXEJt6/OHf8bkLr6B5MI8pGH27stA2DPz3XY1P4kL90mwZh2TbvxPhfN0P 9YlrwJ/F0TmK6unF/xYcaOhhNRQFpt/TwpSkOOWo= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 1B7A03971C30 for ; Fri, 8 Jan 2021 06:05:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B7A03971C30 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 228F3335DAC; Fri, 8 Jan 2021 06:05:10 +0000 (UTC) Date: Fri, 8 Jan 2021 01:05:09 -0500 To: Sebastian Huber Subject: Re: [PATCH v2] gdb/sim: add support for exporting memory map Message-ID: <20210108060509.GL7494@vapier> Mail-Followup-To: Sebastian Huber , gdb-patches@sourceware.org References: <20210106060433.12043-1-vapier@gentoo.org> <20210106110430.23136-1-vapier@gentoo.org> <59e456e1-b308-edb1-2cea-eba79e6536e7@embedded-brains.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f54savKjS/tSNRaU" Content-Disposition: inline In-Reply-To: <59e456e1-b308-edb1-2cea-eba79e6536e7@embedded-brains.de> 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: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" --f54savKjS/tSNRaU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 08 Jan 2021 06:17, Sebastian Huber wrote: > On 06/01/2021 12:04, Mike Frysinger via Gdb-patches wrote: > > This allows gdb to quickly dump & process the memory map that the sim > > knows about. This isn't fully accurate, but is largely limited by the > > gdb memory map format. While the sim supports RWX bits, gdb can only > > handle RW or RO regions. > > --- > > gdb/remote-sim.c | 18 +++++++++++++ > > include/gdb/remote-sim.h | 9 +++++++ > > sim/common/sim-core.c | 57 ++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 84 insertions(+) >=20 > I think this change broke the powerpc simulator (target "powerpc-rtems6"= =20 > for example): >=20 > =C2=A0 CXXLD=C2=A0 gdb > /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:= =20 > remote-sim.o: in function `gdbsim_target::memory_map()': > /tmp/sh/src/rsb/rtems/build/powerpc-rtems6-gdb-0f8e278-x86_64-linux-gnu-1= /build/gdb/../../sourceware-mirror-binutils-gdb-0f8e278/gdb/remote-sim.c:12= 83:=20 > undefined reference to `sim_memory_map' indeed, sorry about that. i've pushed this fix. -mike [PATCH] sim: ppc: stub out sim_memory_map Not clear how to implement this in the ppc-specific sim, so just stub it out. This is as good as it was previously. --- sim/ppc/ChangeLog | 4 ++++ sim/ppc/sim_calls.c | 6 ++++++ 2 files changed, 10 insertions(+) 2021-01-08 Mike Frysinger * sim_calls.c (sim_memory_map): Define. --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -265,6 +265,12 @@ sim_complete_command (SIM_DESC sd, const char *text, c= onst char *word) return NULL; } =20 +char * +sim_memory_map (SIM_DESC sd) +{ + return NULL; +} + /* Polling, if required */ =20 void --f54savKjS/tSNRaU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAl/39hUACgkQQWM7n+g3 9YEtyhAAiYexBWDn6Aj6hWD7grH5omranfBVY7qm5Y45NKyvlS6diSyJQpUqyKCJ hnmBpCz/i5K84LP9t5aI3WLdj/b30U/d0KUg+Gd6PYuJk6MxsWEB3ozEIpfQSHHY I0l5fF0o+r5762ymf/fnS19mQOCIM0st7nzyu0Gvgl6NsJ/oWQGIBR1JmXpuKaYa yfNkeaG93zP+ZOge4UYb1TlNaJRJezVMjmVqeCOZ6GeEa4hnRYJOgizp0VqXfj28 WdSFkc+MPF4JkY8dOiXLAV7iiG3AvdloNU7r3sijPaHLGcyxXq739YA1Gqp2+hZw /JsEkLuEvTCeRlxPHKBhKdsTRn1XWLFdzG3AYEQp7i2Xsld7gPeCBu3SPy2eQWZ5 BuqRBKMwOv2+10xgblLIqb7P40A3RebO/qE9MH1RwGGBABP0DRBHgaFaXwLUkP6w SZI12a8trUGDfF9DjNeiZQTmZ0YWy/6l3x3oJJ+YLUDPBFEsfde8GZvKuZp+Dd95 3deCxuOspiGK22kNi1g8QU9sl8/KkYjmLkKY6e+0X7UYm3k1trJ0UM6F6vH3pOZu XmJmcjAgPIyJ0qSiXJ7SPDq9gjIrtXoLkROyAQMQIGKoXBV7EAXeGo6uRoJrbtrz l3yAHKrR0Sw4SkYvSl4+WRs2+FIFTkmqitx/YvoWHwInHdAZ0pA= =r7ft -----END PGP SIGNATURE----- --f54savKjS/tSNRaU--