Don't warn if target reports no threads
Vladimir Prus
vladimir@codesourcery.com
Wed Oct 20 09:11:00 GMT 2010
On Tuesday, October 19, 2010 19:01:25 Pedro Alves wrote:
> 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).
This appears to work just fine. I've checked in the below patch.
- Volodya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ql.diff
Type: text/x-patch
Size: 1125 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20101020/5ec4a3cf/attachment.bin>
More information about the Gdb-patches
mailing list