diff options
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/target.c | 24 | ||||
-rw-r--r-- | gdb/gdbserver/target.h | 1 |
3 files changed, 32 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 04410fe..f2f63b4 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2014-09-11 Tom Tromey <tromey@redhat.com> + Gary Benson <gbenson@redhat.com> + + * target.h: Include target/target.h. + * target.c (target_read_memory, target_read_uint32) + (target_write_memory): New functions. + 2014-09-11 Gary Benson <gbenson@redhat.com> * server.h (debug_hw_points): Don't declare. diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index dcad5c9..08506e5 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -48,6 +48,22 @@ read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) return res; } +/* See target/target.h. */ + +int +target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) +{ + return read_inferior_memory (memaddr, myaddr, len); +} + +/* See target/target.h. */ + +int +target_read_uint32 (CORE_ADDR memaddr, uint32_t *result) +{ + return read_inferior_memory (memaddr, (gdb_byte *) result, sizeof (*result)); +} + int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) @@ -71,6 +87,14 @@ write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, return res; } +/* See target/target.h. */ + +int +target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len) +{ + return write_inferior_memory (memaddr, myaddr, len); +} + ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, int connected_wait) diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index f5eda8a..a08b753 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -21,6 +21,7 @@ #ifndef TARGET_H #define TARGET_H +#include "target/target.h" #include "target/resume.h" #include "target/wait.h" #include "target/waitstatus.h" |