This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Don't warn if target reports no threads


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]