* Don't warn if target reports no threads
@ 2010-10-19 14:52 Vladimir Prus
2010-10-19 15:01 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2010-10-19 14:52 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: Text/Plain, Size: 367 bytes --]
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?
- Volodya
[-- Attachment #2: rmt-no-warning.diff --]
[-- Type: text/x-patch, Size: 366 bytes --]
diff --git a/gdb/remote.c b/gdb/remote.c
index 50e671d..e3c4117 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2523,7 +2523,6 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit,
{
if (*done != 1)
{
- warning (_("RMT ERROR : failed to get remote thread list."));
result = 0;
}
return result; /* break; */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Don't warn if target reports no threads
2010-10-19 14:52 Don't warn if target reports no threads Vladimir Prus
@ 2010-10-19 15:01 ` Pedro Alves
2010-10-20 9:11 ` Vladimir Prus
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2010-10-19 15:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Vladimir Prus
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Don't warn if target reports no threads
2010-10-19 15:01 ` Pedro Alves
@ 2010-10-20 9:11 ` Vladimir Prus
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Prus @ 2010-10-20 9:11 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
[-- Attachment #1: Type: Text/Plain, Size: 1010 bytes --]
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
[-- Attachment #2: ql.diff --]
[-- Type: text/x-patch, Size: 1125 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.12274
diff -u -p -r1.12274 ChangeLog
--- ChangeLog 19 Oct 2010 21:30:53 -0000 1.12274
+++ ChangeLog 20 Oct 2010 09:10:22 -0000
@@ -1,3 +1,9 @@
+2010-10-20 Vladimir Prus <vladimir@codesourcery.com>
+
+ * remote.c (remote_get_threadlist): If we got empty
+ response, bail out immediately, and don't emit any
+ warnings.
+
2010-10-19 Ulrich Weigand <uweigand@de.ibm.com>
* arm-tdep.c (thumb_get_next_pc_raw): Handle Thumb-16 encoding
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.422
diff -u -p -r1.422 remote.c
--- remote.c 17 Oct 2010 18:24:47 -0000 1.422
+++ remote.c 20 Oct 2010 09:10:23 -0000
@@ -2353,7 +2353,7 @@ remote_get_threadlist (int startflag, th
getpkt (&rs->buf, &rs->buf_size, 0);
if (*rs->buf == '\0')
- *result_count = 0;
+ return 0;
else
*result_count =
parse_threadlist_response (rs->buf + 2, result_limit, &echo_nextthread,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-20 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19 14:52 Don't warn if target reports no threads Vladimir Prus
2010-10-19 15:01 ` Pedro Alves
2010-10-20 9:11 ` Vladimir Prus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).