[01/11] sim/rx: define sim_memory_map

Message ID c53c471ded57adb16bab438495aa39293d3cd9c2.1612179773.git.andrew.burgess@embecosm.com
State New
Headers show
Series
  • fix build warnings for rx simulator
Related show

Commit Message

Andrew Burgess Feb. 1, 2021, 11:44 a.m.
The rx simulator doesn't build due to sim_memory_map not being
defined.  Define it now to return NULL, this can be extended later to
return an actual memory map if anyone wants this functionality.

sim/rx/ChangeLog:

	* gdb-if.c (sim_memory_map): New function.
---
 sim/rx/ChangeLog | 4 ++++
 sim/rx/gdb-if.c  | 8 ++++++++
 2 files changed, 12 insertions(+)

-- 
2.25.4

Comments

Konstantin Kharlamov via Gdb-patches Feb. 1, 2021, 2:46 p.m. | #1
On 01 Feb 2021 11:44, Andrew Burgess wrote:
> The rx simulator doesn't build due to sim_memory_map not being

> defined.  Define it now to return NULL, this can be extended later to

> return an actual memory map if anyone wants this functionality.


i build every sim port, and rx was/is building fine for me.  nothing in
the sim refers to the sim_memory_map, so it failing to build is a bit
surprising.  do you mean gdb is failing to link instead ?  i don't always
try to build those for ports as not all have gdb ports.
-mike
Andrew Burgess Feb. 8, 2021, 11:01 a.m. | #2
* Mike Frysinger <vapier@gentoo.org> [2021-02-01 09:46:44 -0500]:

> On 01 Feb 2021 11:44, Andrew Burgess wrote:

> > The rx simulator doesn't build due to sim_memory_map not being

> > defined.  Define it now to return NULL, this can be extended later to

> > return an actual memory map if anyone wants this functionality.

> 

> i build every sim port, and rx was/is building fine for me.  nothing in

> the sim refers to the sim_memory_map, so it failing to build is a bit

> surprising.  do you mean gdb is failing to link instead ?  i don't always

> try to build those for ports as not all have gdb ports.


You are correct of course.

I updated the wording of the commit message more inline with the patch
you submitted here:

   https://sourceware.org/pipermail/gdb-patches/2021-February/175689.html

Thanks,
Andrew

Patch

diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index 63705f9bb0e..6f8bfbd1c50 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -854,3 +854,11 @@  sim_complete_command (SIM_DESC sd, const char *text, const char *word)
 {
   return NULL;
 }
+
+/* Stub this out for now.  */
+
+char *
+sim_memory_map (SIM_DESC sd)
+{
+  return NULL;
+}