* [patch] Get rid of target_read_memory_partial()
@ 2006-08-22 12:57 Maciej W. Rozycki
2006-08-25 16:05 ` Keith Seitz
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2006-08-22 12:57 UTC (permalink / raw)
To: insight; +Cc: Daniel Jacobowitz, Maciej W. Rozycki
Hello,
A recent change to gdb broke the build of insight. The
target_read_memory_partial() function is not available anymore. Here is a
fix, replacing the call with target_read(), as appropriate. Tested with
the mipsisa32-elf target using the simulator.
2006-08-22 Maciej W. Rozycki <macro@mips.com>
* generic/gdbtk-cmds.c (gdb_update_mem): Use target_read.
OK to apply?
Maciej
gdb-6.5.50-20060822-gdbtk-target_read_memory-0
Index: src/gdb/gdbtk/generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.92
diff -u -p -r1.92 gdbtk-cmds.c
--- src/gdb/gdbtk/generic/gdbtk-cmds.c 29 Mar 2006 13:49:37 -0000 1.92
+++ src/gdb/gdbtk/generic/gdbtk-cmds.c 22 Aug 2006 12:11:37 -0000
@@ -2429,15 +2429,12 @@ gdb_update_mem (ClientData clientData, T
memset (mbuf, 0, nbytes + 32);
mptr = cptr = mbuf;
- rnum = 0;
- while (rnum < nbytes)
+ rnum = target_read (¤t_target, TARGET_OBJECT_MEMORY, NULL,
+ mbuf, addr, nbytes);
+ if (rnum <= 0)
{
- int error;
- int num = target_read_memory_partial (addr + rnum, mbuf + rnum,
- nbytes - rnum, &error);
- if (num <= 0)
- break;
- rnum += num;
+ gdbtk_set_result (interp, "Unable to read memory.");
+ return TCL_ERROR;
}
if (objc == 8)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Get rid of target_read_memory_partial()
2006-08-22 12:57 [patch] Get rid of target_read_memory_partial() Maciej W. Rozycki
@ 2006-08-25 16:05 ` Keith Seitz
0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2006-08-25 16:05 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: insight
Maciej W. Rozycki wrote:
> 2006-08-22 Maciej W. Rozycki <macro@mips.com>
>
> * generic/gdbtk-cmds.c (gdb_update_mem): Use target_read.
>
> OK to apply?
Yes, please do.
Thank you for the patch!
Keith
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-25 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-22 12:57 [patch] Get rid of target_read_memory_partial() Maciej W. Rozycki
2006-08-25 16:05 ` Keith Seitz
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).