diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-03-05 03:43:19 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-03-05 03:43:19 +0000 |
commit | c3e735a6a3d7b849b44f102a0c3e2722d49666b7 (patch) | |
tree | 624482b0563448cde74e4eb0b15a82dcfd18d4ba /gdb/gdbserver/target.h | |
parent | d81510055c95d786c5ce789b1e96f9919f91b05a (diff) | |
download | gdb-c3e735a6a3d7b849b44f102a0c3e2722d49666b7.zip gdb-c3e735a6a3d7b849b44f102a0c3e2722d49666b7.tar.gz gdb-c3e735a6a3d7b849b44f102a0c3e2722d49666b7.tar.bz2 |
* linux-low.c (linux_read_memory): Change return type to
int. Check for and return error from ptrace().
* target.c (read_inferior_memory): Change return type to int. Pass
back return status from the_target->read_memory().
* target.h (struct target_ops): Adapt *read_memory() prototype.
Update comment.
(read_inferior_memory): Adapt prototype.
* server.c (main): Return an error packet if
read_inferior_memory() returns an error.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r-- | gdb/gdbserver/target.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 88ff2d4..770ffcb 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -102,9 +102,11 @@ struct target_ops /* Read memory from the inferior process. This should generally be called through read_inferior_memory, which handles breakpoint shadowing. - Read LEN bytes at MEMADDR into a buffer at MYADDR. */ + Read LEN bytes at MEMADDR into a buffer at MYADDR. + + Returns 0 on success and errno on failure. */ - void (*read_memory) (CORE_ADDR memaddr, char *myaddr, int len); + int (*read_memory) (CORE_ADDR memaddr, char *myaddr, int len); /* Write memory to the inferior process. This should generally be called through write_inferior_memory, which handles breakpoint shadowing. @@ -160,7 +162,7 @@ void set_target_ops (struct target_ops *); unsigned char mywait (char *statusp, int connected_wait); -void read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len); +int read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len); int write_inferior_memory (CORE_ADDR memaddr, const char *myaddr, int len); |