From: Vladimir Prus Date: Mon, 25 Feb 2008 09:59:06 +0000 (+0000) Subject: * remote.c (remote_get_threadlist): If the response X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8f2712d3a2049772fa006493b2305ef57e05e78;p=binutils-gdb.git * remote.c (remote_get_threadlist): If the response is empty, don't try to parse it. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1af57618e4b..0cbb6c2d1da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-02-25 Vladimir Prus + + * remote.c (remote_get_threadlist): If the response + is empty, don't try to parse it. + 2008-02-23 Vladimir Prus Unbreak 'target async'. diff --git a/gdb/remote.c b/gdb/remote.c index 8fdc0da71d7..3f50ff28df1 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1740,9 +1740,12 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit, putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); - *result_count = - parse_threadlist_response (rs->buf + 2, result_limit, &echo_nextthread, - threadlist, done); + if (*rs->buf == '\0') + *result_count = 0; + else + *result_count = + parse_threadlist_response (rs->buf + 2, result_limit, &echo_nextthread, + threadlist, done); if (!threadmatch (&echo_nextthread, nextthread)) {