This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 (&current_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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]