diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-02-25 09:59:06 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-02-25 09:59:06 +0000 |
commit | d8f2712d3a2049772fa006493b2305ef57e05e78 (patch) | |
tree | d5e15e85cdf05a0b9934177428749bc137bcb7c1 /gdb/remote.c | |
parent | 01f30ddd0750b18f6d545a262de43ef6f69a7200 (diff) | |
download | gdb-d8f2712d3a2049772fa006493b2305ef57e05e78.zip gdb-d8f2712d3a2049772fa006493b2305ef57e05e78.tar.gz gdb-d8f2712d3a2049772fa006493b2305ef57e05e78.tar.bz2 |
* remote.c (remote_get_threadlist): If the response
is empty, don't try to parse it.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 8fdc0da..3f50ff2 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)) { |