This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix core_xfer_partial buggy
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: gdb-patches at sourceware dot org
- Date: Sun, 19 Aug 2007 23:04:21 +0100
- Subject: Fix core_xfer_partial buggy
Hi,
Daniel spotted this in one of the Windows DLL update rounds. Here it is on
its own, and regtested on i686-pc-linux and i686-pc-cygwin.
(doesn't Coverity catch this?)
Cheers,
Pedro Alves
2007-08-19 Daniel Jacobowitz <dan@codesourcery.com>
* corelow.c (core_xfer_partial): Pass writebuf to
deprecated_xfer_memory in TARGET_OBJECT_MEMORY write case.
---
gdb/corelow.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: src/gdb/corelow.c
===================================================================
--- src.orig/gdb/corelow.c 2007-08-19 18:14:42.000000000 +0100
+++ src/gdb/corelow.c 2007-08-19 18:22:22.000000000 +0100
@@ -523,11 +523,11 @@ core_xfer_partial (struct target_ops *op
{
case TARGET_OBJECT_MEMORY:
if (readbuf)
- return (*ops->deprecated_xfer_memory) (offset, readbuf, len,
- 0/*write*/, NULL, ops);
+ return (*ops->deprecated_xfer_memory) (offset, readbuf,
+ len, 0/*write*/, NULL, ops);
if (writebuf)
- return (*ops->deprecated_xfer_memory) (offset, readbuf, len,
- 1/*write*/, NULL, ops);
+ return (*ops->deprecated_xfer_memory) (offset, (gdb_byte *) writebuf,
+ len, 1/*write*/, NULL, ops);
return -1;
case TARGET_OBJECT_AUXV: