Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Cc: Yao Qi <yao@codesourcery.com>
Subject: Re: [PATCH 1/2] Fix error when GDB connects to GDBserver with qC disabled
Date: Fri, 25 Jan 2013 17:41:00 -0000	[thread overview]
Message-ID: <5102C37A.6080307@redhat.com> (raw)
In-Reply-To: <5102C106.5060703@redhat.com>

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)


      reply	other threads:[~2013-01-25 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23  8:36 Yao Qi
2013-01-23  8:36 ` [PATCH 2/2] Don't query stub if the pid is faked Yao Qi
2013-01-24 17:23   ` Pedro Alves
2013-01-24 17:05 ` [PATCH 1/2] Fix error when GDB connects to GDBserver with qC disabled Pedro Alves
2013-01-25 10:44   ` Yao Qi
2013-01-25 17:30     ` Pedro Alves
2013-01-25 17:41       ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5102C37A.6080307@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox