diff options
author | Markus Metzger <mmetzger@sourceware.org> | 2013-03-11 08:31:48 +0000 |
---|---|---|
committer | Markus Metzger <mmetzger@sourceware.org> | 2013-03-11 08:31:48 +0000 |
commit | 5cc22e4cf71283b8f54e27511b3a9e1c54adfe9f (patch) | |
tree | 43711d231d916e60cc712a31366e35ffdefc4615 /gdb | |
parent | c12a29171fe3379095cfc896e0f8ddfb18c614c3 (diff) | |
download | gdb-5cc22e4cf71283b8f54e27511b3a9e1c54adfe9f.zip gdb-5cc22e4cf71283b8f54e27511b3a9e1c54adfe9f.tar.gz gdb-5cc22e4cf71283b8f54e27511b3a9e1c54adfe9f.tar.bz2 |
Preserve a verbose error message of xfer functions if they return -3.
gdbserver/
* server.c (handle_qxfer): Preserve error message if -3 is
returned.
(qxfer): Document the -3 return value.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 16 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 802f895..b26f85b 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 2013-03-11 Markus Metzger <markus.t.metzger@intel.com> + * server.c (handle_qxfer): Preserve error message if -3 is + returned. + (qxfer): Document the -3 return value. + +2013-03-11 Markus Metzger <markus.t.metzger@intel.com> + * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c. (linux_btrace_h): New variable. (linux-btrace.o): New rule. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 922a5bf..9592c69 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -892,10 +892,10 @@ struct qxfer data-specific information to the target. Return the number of bytes actually transfered, zero when no - further transfer is possible, -1 on error, and -2 when the - transfer is not supported. Return of a positive value smaller - than LEN does not indicate the end of the object, only the end of - the transfer. + further transfer is possible, -1 on error, -2 when the transfer + is not supported, and -3 on a verbose error message that should + be preserved. Return of a positive value smaller than LEN does + not indicate the end of the object, only the end of the transfer. One, and only one, of readbuf or writebuf must be non-NULL. */ int (*xfer) (const char *annex, @@ -1323,6 +1323,10 @@ handle_qxfer (char *own_buf, int packet_len, int *new_packet_len_p) free (data); return 0; } + else if (n == -3) + { + /* Preserve error message. */ + } else if (n < 0) write_enn (own_buf); else if (n > len) @@ -1361,6 +1365,10 @@ handle_qxfer (char *own_buf, int packet_len, int *new_packet_len_p) free (data); return 0; } + else if (n == -3) + { + /* Preserve error message. */ + } else if (n < 0) write_enn (own_buf); else |