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/server.c | |
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/server.c')
-rw-r--r-- | gdb/gdbserver/server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index fb667ef..cc8923e 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -462,8 +462,10 @@ main (int argc, char *argv[]) break; case 'm': decode_m_packet (&own_buf[1], &mem_addr, &len); - read_inferior_memory (mem_addr, mem_buf, len); - convert_int_to_ascii (mem_buf, own_buf, len); + if (read_inferior_memory (mem_addr, mem_buf, len) == 0) + convert_int_to_ascii (mem_buf, own_buf, len); + else + write_enn (own_buf); break; case 'M': decode_M_packet (&own_buf[1], &mem_addr, &len, mem_buf); |