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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/remote.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1af5761..0cbb6c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-02-25 Vladimir Prus <vladimir@codesourcery.com> + + * remote.c (remote_get_threadlist): If the response + is empty, don't try to parse it. + 2008-02-23 Vladimir Prus <vladimir@codesourcery.com> Unbreak 'target async'. 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)) { |