Re: [PATCH 1/2] Fix error when GDB connects to GDBserver with qC disabled

Pedro Alves
2013-01-25T17:41:08Z

On 01/25/2013 05:29 PM, Pedro Alves wrote:
> On 01/25/2013 10:42 AM, Yao Qi wrote:

>>> +
>>> + This function is called after handling the '?' or 'vRun' packets,
>>> + whose response is a stop reply from which we can also try
>>> + extracting the thread. If the target doesn't support the explicit
>>> + qC query, we infer the current thread from that stop reply, passed
>>> + in in WAIT_STATUS, which may be NULL. */
>>
>> redundant "in"?
>
> Sounds right to me as is. Read as, the stop reply is "passed in".
> But where?, "in WAITSTATUS". I'll change it to something else if
> a native speaker prefers it.

Actually, never mind that... I've updated the other comment to
mention we now try T first, but forgot to update that comment
above. Applied.

--
Pedro Alves

Fix add_current_inferior_and_thread's describing comment.

add_current_inferior_and_thread tries the stop reply first. Tweak its
comment to reflect reality.

2013-01-25 Pedro Alves <palves@redhat.com>

* remote.c (add_current_inferior_and_thread): Tweak comment.

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c
+++ src/gdb/remote.c
@@ -3268,10 +3268,10 @@ stop_reply_extract_thread (char *stop_re
to return the current thread.

This function is called after handling the '?' or 'vRun' packets,
- whose response is a stop reply from which we can also try
- extracting the thread. If the target doesn't support the explicit
- qC query, we infer the current thread from that stop reply, passed
- in in WAIT_STATUS, which may be NULL. */
+ whose response is a stop reply from which we can try extracting the
+ current thread, so we try that first. WAIT_STATUS is that stop
+ reply. It may be NULL if a stop reply is not
+ available/applicable. */

static void
add_current_inferior_and_thread (char *wait_status)