forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user