mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
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.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
|
||||||
|
|
||||||
* Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
|
* Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
|
||||||
|
@ -892,10 +892,10 @@ struct qxfer
|
|||||||
data-specific information to the target.
|
data-specific information to the target.
|
||||||
|
|
||||||
Return the number of bytes actually transfered, zero when no
|
Return the number of bytes actually transfered, zero when no
|
||||||
further transfer is possible, -1 on error, and -2 when the
|
further transfer is possible, -1 on error, -2 when the transfer
|
||||||
transfer is not supported. Return of a positive value smaller
|
is not supported, and -3 on a verbose error message that should
|
||||||
than LEN does not indicate the end of the object, only the end of
|
be preserved. Return of a positive value smaller than LEN does
|
||||||
the transfer.
|
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. */
|
One, and only one, of readbuf or writebuf must be non-NULL. */
|
||||||
int (*xfer) (const char *annex,
|
int (*xfer) (const char *annex,
|
||||||
@ -1323,6 +1323,10 @@ handle_qxfer (char *own_buf, int packet_len, int *new_packet_len_p)
|
|||||||
free (data);
|
free (data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (n == -3)
|
||||||
|
{
|
||||||
|
/* Preserve error message. */
|
||||||
|
}
|
||||||
else if (n < 0)
|
else if (n < 0)
|
||||||
write_enn (own_buf);
|
write_enn (own_buf);
|
||||||
else if (n > len)
|
else if (n > len)
|
||||||
@ -1361,6 +1365,10 @@ handle_qxfer (char *own_buf, int packet_len, int *new_packet_len_p)
|
|||||||
free (data);
|
free (data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (n == -3)
|
||||||
|
{
|
||||||
|
/* Preserve error message. */
|
||||||
|
}
|
||||||
else if (n < 0)
|
else if (n < 0)
|
||||||
write_enn (own_buf);
|
write_enn (own_buf);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user