Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb/sim: add support for exporting memory map
Date: Fri, 8 Jan 2021 01:05:09 -0500	[thread overview]
Message-ID: <20210108060509.GL7494@vapier> (raw)
In-Reply-To: <59e456e1-b308-edb1-2cea-eba79e6536e7@embedded-brains.de>

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

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(+)
> 
> I think this change broke the powerpc simulator (target "powerpc-rtems6" 
> for example):
> 
>    CXXLD  gdb
> /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: 
> 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:1283: 
> 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  <vapier@gentoo.org>

	* 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, const char *word)
   return NULL;
 }
 
+char *
+sim_memory_map (SIM_DESC sd)
+{
+  return NULL;
+}
+
 /* Polling, if required */
 
 void

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-01-08  6:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  6:04 [PATCH] " Mike Frysinger via Gdb-patches
2021-01-06  9:49 ` Andrew Burgess
2021-01-06 11:04 ` [PATCH v2] " Mike Frysinger via Gdb-patches
2021-01-07  9:28   ` Andrew Burgess
2021-01-08  5:17   ` Sebastian Huber
2021-01-08  6:05     ` Mike Frysinger via Gdb-patches [this message]
2021-01-08 10:20       ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210108060509.GL7494@vapier \
    --to=gdb-patches@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox