* server.c (handle_query): Correct error handling for read_auxv.
This commit is contained in:
parent
821001857f
commit
000ef4f0ec
2 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue