public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY
@ 2009-06-16 20:25 Pedro Alves
  2009-06-19 13:53 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2009-06-16 20:25 UTC (permalink / raw)
  To: insight

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)
     {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY
  2009-06-16 20:25 Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY Pedro Alves
@ 2009-06-19 13:53 ` Keith Seitz
  2009-06-30  1:48   ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2009-06-19 13:53 UTC (permalink / raw)
  To: Pedro Alves; +Cc: insight

Pedro Alves wrote:

> (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.  ;-)

I think of it exactly the same way as gdb. By all means, if it is an 
"obvious" failure, don't hesitate to commit it.

Thanks for the patch!
Keith

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY
  2009-06-19 13:53 ` Keith Seitz
@ 2009-06-30  1:48   ` Pedro Alves
  0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2009-06-30  1:48 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

On Tuesday 16 June 2009 21:23:15, Keith Seitz wrote:
> Pedro Alves wrote:
> 
> > (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.  ;-)
> 
> I think of it exactly the same way as gdb. By all means, if it is an 
> "obvious" failure, don't hesitate to commit it.

Ack.  Thanks.

> Thanks for the patch!

You're welcome.  Checked in now.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-19 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-16 20:25 Adjust insight to recent GDB changes around TARGET_OBJECT_MEMORY Pedro Alves
2009-06-19 13:53 ` Keith Seitz
2009-06-30  1:48   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).