diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-11-29 08:41:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-11-29 08:41:56 +0000 |
commit | cbfc58d1256ae92102a3b1e10e0698db095eea5c (patch) | |
tree | fb88b248b83eaf3834e4c76db5b8f02306dee048 /gdb/sparc-nat.c | |
parent | 3919e12ce57a6ea9e5647f4707c5dce4382a7356 (diff) | |
download | gdb-cbfc58d1256ae92102a3b1e10e0698db095eea5c.zip gdb-cbfc58d1256ae92102a3b1e10e0698db095eea5c.tar.gz gdb-cbfc58d1256ae92102a3b1e10e0698db095eea5c.tar.bz2 |
* sparc-nat.c (inf_ptrace_xfer_partial): New variable.
(sparc_xfer_partial): New function.
(sparc_target): Save value of to_xfer_partial from ptrace vector.
Set to_xfer_partial.
Diffstat (limited to 'gdb/sparc-nat.c')
-rw-r--r-- | gdb/sparc-nat.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index a3836ce..4bd7b72 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -305,6 +305,23 @@ sparc_xfer_wcookie (struct target_ops *ops, enum target_object object, memcpy (readbuf, buf + offset, len); return len; } + +LONGEST (*inf_ptrace_xfer_partial) (struct target_ops *, enum target_object, + const char *, void *, const void *, + ULONGEST, LONGEST); + +static LONGEST +sparc_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_WCOOKIE) + return sparc_xfer_wcookie (ops, object, annex, readbuf, writebuf, + offset, len); + + return inf_ptrace_xfer_partial (ops, object, annex, readbuf, writebuf, + offset, len); +} /* Create a prototype generic SPARC target. The client can override it with local methods. */ @@ -317,6 +334,8 @@ sparc_target (void) t = inf_ptrace_target (); t->to_fetch_registers = fetch_inferior_registers; t->to_store_registers = store_inferior_registers; + inf_ptrace_xfer_partial = t->to_xfer_partial; + t->to_xfer_partial = sparc_xfer_partial; return t; } |