projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make MSYMBOL_VALUE_ADDRESS an rvalue
[deliverable/binutils-gdb.git]
/
gdb
/
rs6000-nat.c
diff --git
a/gdb/rs6000-nat.c
b/gdb/rs6000-nat.c
index d0ec0c733e7292b0485630cebcb0428b0d88a4fb..4ba955c5cc0acc3cf346bc92669304cffd421fdb 100644
(file)
--- a/
gdb/rs6000-nat.c
+++ b/
gdb/rs6000-nat.c
@@
-1,6
+1,6
@@
/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
- Copyright (C) 1986-201
3
Free Software Foundation, Inc.
+ Copyright (C) 1986-201
4
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-79,10
+79,7
@@
static void exec_one_dummy_insn (struct regcache *);
static void exec_one_dummy_insn (struct regcache *);
-static LONGEST rs6000_xfer_shared_libraries
- (struct target_ops *ops, enum target_object object,
- const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf,
- ULONGEST offset, LONGEST len);
+static target_xfer_partial_ftype rs6000_xfer_shared_libraries;
/* Given REGNO, a gdb register number, return the corresponding
number suitable for use as a ptrace() parameter. Return -1 if
/* Given REGNO, a gdb register number, return the corresponding
number suitable for use as a ptrace() parameter. Return -1 if
@@
-377,16
+374,13
@@
rs6000_store_inferior_registers (struct target_ops *ops,
}
}
}
}
+/* Implement the to_xfer_partial target_ops method. */
-/* Attempt a transfer all LEN bytes starting at OFFSET between the
- inferior's OBJECT:ANNEX space and GDB's READBUF/WRITEBUF buffer.
- Return the number of bytes actually transferred. */
-
-static LONGEST
+static enum target_xfer_status
rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf,
rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf,
- ULONGEST offset,
LONGEST
len)
+ ULONGEST offset,
ULONGEST len, ULONGEST *xfered_
len)
{
pid_t pid = ptid_get_pid (inferior_ptid);
int arch64 = ARCH64 ();
{
pid_t pid = ptid_get_pid (inferior_ptid);
int arch64 = ARCH64 ();
@@
-396,7
+390,7
@@
rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
case TARGET_OBJECT_LIBRARIES_AIX:
return rs6000_xfer_shared_libraries (ops, object, annex,
readbuf, writebuf,
case TARGET_OBJECT_LIBRARIES_AIX:
return rs6000_xfer_shared_libraries (ops, object, annex,
readbuf, writebuf,
- offset, len);
+ offset, len
, xfered_len
);
case TARGET_OBJECT_MEMORY:
{
union
case TARGET_OBJECT_MEMORY:
{
union
@@
-454,7
+448,7
@@
rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
(int *) (uintptr_t) rounded_offset,
buffer.word, NULL);
if (errno)
(int *) (uintptr_t) rounded_offset,
buffer.word, NULL);
if (errno)
- return
0
;
+ return
TARGET_XFER_EOF
;
}
if (readbuf)
}
if (readbuf)
@@
-468,18
+462,19
@@
rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
(int *)(uintptr_t)rounded_offset,
0, NULL);
if (errno)
(int *)(uintptr_t)rounded_offset,
0, NULL);
if (errno)
- return
0
;
+ return
TARGET_XFER_EOF
;
/* Copy appropriate bytes out of the buffer. */
memcpy (readbuf, buffer.byte + (offset - rounded_offset),
partial_len);
}
/* Copy appropriate bytes out of the buffer. */
memcpy (readbuf, buffer.byte + (offset - rounded_offset),
partial_len);
}
- return partial_len;
+ *xfered_len = (ULONGEST) partial_len;
+ return TARGET_XFER_OK;
}
default:
}
default:
- return
-1
;
+ return
TARGET_XFER_E_IO
;
}
}
}
}
@@
-685,11
+680,11
@@
rs6000_ptrace_ldinfo (ptid_t ptid)
/* Implement the to_xfer_partial target_ops method for
TARGET_OBJECT_LIBRARIES_AIX objects. */
/* Implement the to_xfer_partial target_ops method for
TARGET_OBJECT_LIBRARIES_AIX objects. */
-static
LONGEST
+static
enum target_xfer_status
rs6000_xfer_shared_libraries
(struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf,
rs6000_xfer_shared_libraries
(struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf,
- ULONGEST offset,
LONGEST
len)
+ ULONGEST offset,
ULONGEST len, ULONGEST *xfered_
len)
{
gdb_byte *ldi_buf;
ULONGEST result;
{
gdb_byte *ldi_buf;
ULONGEST result;
@@
-700,7
+695,7
@@
rs6000_xfer_shared_libraries
gdb_assert (target_has_execution);
if (writebuf)
gdb_assert (target_has_execution);
if (writebuf)
- return
-1
;
+ return
TARGET_XFER_E_IO
;
ldi_buf = rs6000_ptrace_ldinfo (inferior_ptid);
gdb_assert (ldi_buf != NULL);
ldi_buf = rs6000_ptrace_ldinfo (inferior_ptid);
gdb_assert (ldi_buf != NULL);
@@
-710,7
+705,14
@@
rs6000_xfer_shared_libraries
xfree (ldi_buf);
do_cleanups (cleanup);
xfree (ldi_buf);
do_cleanups (cleanup);
- return result;
+
+ if (result == 0)
+ return TARGET_XFER_EOF;
+ else
+ {
+ *xfered_len = result;
+ return TARGET_XFER_OK;
+ }
}
void _initialize_rs6000_nat (void);
}
void _initialize_rs6000_nat (void);
This page took
0.025201 seconds
and
4
git commands to generate.