Adjust ia64_linux_xfer_partial following to_xfer_partial API change.
ia64-linux-nat.c no longer compiles because ia64_linux_xfer_partial no longer matches the to_xfer_partial prototype. This patch fixes the problem by adjusting it accordingly. gdb/ChangeLog: * ia64-linux-nat.c (ia64_linux_xfer_partial): Add function documentation. Adjust prototype to match the target_ops to_xfer_partial method. Adjust implementation accordingly.
This commit is contained in:
parent
041ab8b484
commit
475109d870
|
@ -1,3 +1,9 @@
|
||||||
|
2014-02-25 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ia64-linux-nat.c (ia64_linux_xfer_partial): Add function
|
||||||
|
documentation. Adjust prototype to match the target_ops
|
||||||
|
to_xfer_partial method. Adjust implementation accordingly.
|
||||||
|
|
||||||
2014-02-25 Hui Zhu <hui@codesourcery.com>
|
2014-02-25 Hui Zhu <hui@codesourcery.com>
|
||||||
|
|
||||||
* target.h (target_ops): Fix TARGET_DEFAULT_RETURN of
|
* target.h (target_ops): Fix TARGET_DEFAULT_RETURN of
|
||||||
|
|
|
@ -838,18 +838,36 @@ ia64_linux_store_registers (struct target_ops *ops,
|
||||||
|
|
||||||
static target_xfer_partial_ftype *super_xfer_partial;
|
static target_xfer_partial_ftype *super_xfer_partial;
|
||||||
|
|
||||||
static LONGEST
|
/* Implement the to_xfer_partial target_ops method. */
|
||||||
|
|
||||||
|
static enum target_xfer_status
|
||||||
ia64_linux_xfer_partial (struct target_ops *ops,
|
ia64_linux_xfer_partial (struct target_ops *ops,
|
||||||
enum target_object object,
|
enum target_object object,
|
||||||
const char *annex,
|
const char *annex,
|
||||||
gdb_byte *readbuf, const gdb_byte *writebuf,
|
gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
ULONGEST offset, ULONGEST len)
|
ULONGEST offset, ULONGEST len,
|
||||||
|
ULONGEST *xfered_len)
|
||||||
{
|
{
|
||||||
if (object == TARGET_OBJECT_UNWIND_TABLE && writebuf == NULL && offset == 0)
|
if (object == TARGET_OBJECT_UNWIND_TABLE && readbuf != NULL)
|
||||||
return syscall (__NR_getunwind, readbuf, len);
|
{
|
||||||
|
gdb_byte *tmp_buf = alloca (offset + len);
|
||||||
|
ULONGEST xfered;
|
||||||
|
|
||||||
|
xfered = syscall (__NR_getunwind, readbuf, offset + len);
|
||||||
|
if (xfered <= 0)
|
||||||
|
return TARGET_XFER_E_IO;
|
||||||
|
else if (xfered <= offset)
|
||||||
|
return TARGET_XFER_EOF;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy (readbuf, tmp_buf + offset, xfered - offset);
|
||||||
|
*xfered_len = xfered - offset;
|
||||||
|
return TARGET_XFER_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
|
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
|
||||||
offset, len);
|
offset, len, xfered_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For break.b instruction ia64 CPU forgets the immediate value and generates
|
/* For break.b instruction ia64 CPU forgets the immediate value and generates
|
||||||
|
|
Loading…
Reference in New Issue