This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Don't warn if target reports no threads
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Vladimir Prus <vladimir at codesourcery dot com>
- Date: Tue, 19 Oct 2010 16:01:25 +0100
- Subject: Re: Don't warn if target reports no threads
- References: <201010191852.03421.vladimir@codesourcery.com>
On Tuesday 19 October 2010 15:52:03, Vladimir Prus wrote:
>
> In the case when stub refuses to understand all modern thread-listing packets,
> GDB falls back to qL packet, if if stub refuses to handle that either,
> reports:
>
> RMT ERROR : failed to get remote thread list.
>
> The further operation continues normally, and qL is really optional packet, so
> there's no point scaring a user like that. Is the patch below OK?
remote_get_threadlist has this:
getpkt (&rs->buf, &rs->buf_size, 0);
if (*rs->buf == '\0')
*result_count = 0;
else
...
would it work to just make that:
if (*rs->buf == '\0')
return 0;
instead? That'd be easier to read, and leave the warning if
something did go bust with the thread listing for targets
that do support the packet (not sure there are any though).
--
Pedro Alves