aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote-sim.c17
2 files changed, 13 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2dddbf3..2c7b655 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-06 Pedro Alves <palves@redhat.com>
+
+ * remote-sim.c (gdbsim_xfer_inferior_memory): Use
+ host_address_to_string, and send debug output to gdb_stdlog.
+
2013-09-06 Ricard Wanderlof <ricardw@axis.com>
* Makefile.in (ALL_TARGET_OBS): Add cris-linux-tdep.o.
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index d534e56..49e2581 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -1086,18 +1086,17 @@ gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
gdb_assert (sim_data->gdbsim_desc != NULL);
if (remote_debug)
- {
- /* FIXME: Send to something other than STDOUT? */
- printf_filtered ("gdbsim_xfer_inferior_memory: myaddr 0x");
- gdb_print_host_address (myaddr, gdb_stdout);
- printf_filtered (", memaddr %s, len %d, write %d\n",
- paddress (target_gdbarch (), memaddr), len, write);
- if (remote_debug && write)
- dump_mem (myaddr, len);
- }
+ fprintf_unfiltered (gdb_stdlog,
+ "gdbsim_xfer_inferior_memory: myaddr %s, "
+ "memaddr %s, len %d, write %d\n",
+ host_address_to_string (myaddr),
+ paddress (target_gdbarch (), memaddr),
+ len, write);
if (write)
{
+ if (remote_debug && len > 0)
+ dump_mem (myaddr, len);
len = sim_write (sim_data->gdbsim_desc, memaddr, myaddr, len);
}
else