mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* server.c (handle_query): Correct error handling for read_auxv.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* server.c (handle_query): Correct error handling for read_auxv.
|
||||
|
||||
2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
|
||||
|
||||
@@ -232,7 +232,9 @@ handle_query (char *own_buf, int *new_packet_len_p)
|
||||
len = PBUFSIZ - 2;
|
||||
data = malloc (len + 1);
|
||||
n = (*the_target->read_auxv) (ofs, data, len + 1);
|
||||
if (n > len)
|
||||
if (n < 0)
|
||||
write_enn (own_buf);
|
||||
else if (n > len)
|
||||
*new_packet_len_p = write_qxfer_response (own_buf, data, len, 1);
|
||||
else
|
||||
*new_packet_len_p = write_qxfer_response (own_buf, data, n, 0);
|
||||
|
||||
Reference in New Issue
Block a user