This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY
- From: Pedro Alves <pedro at codesourcery dot com>
- To: insight at sourceware dot org
- Date: Tue, 16 Jun 2009 19:53:39 +0100
- Subject: Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY
Hello,
Here's a completely untested patch that should fix recent
regressions similar to:
http://sourceware.org/ml/gdb-patches/2009-06/msg00405.html
... due to some core gdb changes.
(I didn't find any other TARGET_OBJECT_MEMORY access under gdbtk)
I'd check this in as obvious, but I don't know the rules on
this side of the fence. ;-)
--
Pedro Alves
2009-06-16 Pedro Alves <pedro@codesourcery.com>
* generic/gdbtk-cmds.c (gdb_update_mem): Dispatch
TARGET_OBJECT_MEMORY reads to the topmost target, not to the
flattened current_target.
---
gdb/gdbtk/generic/gdbtk-cmds.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: src/gdb/gdbtk/generic/gdbtk-cmds.c
===================================================================
--- src.orig/gdb/gdbtk/generic/gdbtk-cmds.c 2009-06-16 19:46:14.000000000 +0100
+++ src/gdb/gdbtk/generic/gdbtk-cmds.c 2009-06-16 19:46:59.000000000 +0100
@@ -2448,7 +2448,9 @@ gdb_update_mem (ClientData clientData, T
memset (mbuf, 0, nbytes + 32);
mptr = cptr = mbuf;
- rnum = target_read (¤t_target, TARGET_OBJECT_MEMORY, NULL,
+ /* Dispatch memory reads to the topmost target, not the flattened
+ current_target. */
+ rnum = target_read (current_target.beneath, TARGET_OBJECT_MEMORY, NULL,
mbuf, addr, nbytes);
if (rnum <= 0)
{