From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19867 invoked by alias); 15 May 2014 15:33:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19856 invoked by uid 89); 15 May 2014 15:33:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 May 2014 15:33:17 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Wkxej-0005sW-Ui from Luis_Gustavo@mentor.com ; Thu, 15 May 2014 08:33:14 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 May 2014 08:33:13 -0700 Received: from [172.30.4.64] ([172.30.4.64]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 15 May 2014 08:33:12 -0700 Message-ID: <5374DE29.3010606@codesourcery.com> Date: Thu, 15 May 2014 15:33:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: David Taylor , gdb-patches@sourceware.org Subject: Re: gdb.texinfo patch References: <10463.1400167510@usendtaylorx2l> In-Reply-To: <10463.1400167510@usendtaylorx2l> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00232.txt.bz2 On 05/15/2014 12:25 PM, David Taylor wrote: > In writing a new stub (to replace our old stub), I have discovered what > I believe to be the rule for how GDB chooses which thread to stop during > the initial connection. Knowing this sooner would have saved my some > grief. Hoping to help the next person avoid that same grief, here's a > patch (as a unified diff against gdb/doc/gdb.texinfo of GDB 7.7) to > document it. > > It adds text to the discussion of the qfThreadInfo / qsThreadInfo > messages. > > Index: gdb/doc/gdb.texinfo > =================================================================== > RCS file: /home/cvsroot/GDB/gdb/doc/gdb.texinfo,v > retrieving revision 1.1.1.2 > diff -u -r1.1.1.2 gdb.texinfo > --- gdb/doc/gdb.texinfo 18 Feb 2014 15:36:03 -0000 1.1.1.2 > +++ gdb/doc/gdb.texinfo 15 May 2014 15:11:23 -0000 > @@ -39082,6 +39083,12 @@ > Refer to @ref{thread-id syntax}, for the format of the @var{thread-id} > fields. > > +@emph{Note: @value{GDBN} will send the qfThreadInfo query during the > +initial connection with the remote target. And the very first thread ID > +mentioned in the reply will be stopped by @value{GDBN} in a subsequent > +message. Therefore the stub should ensure that the first thread ID in > +the qfThreadInfo reply is suitable for being stopped by @value{GDBN}.} > + > @item qGetTLSAddr:@var{thread-id},@var{offset},@var{lm} > @cindex get thread-local storage address, remote request > @cindex @samp{qGetTLSAddr} packet > > EMC has a copyright assignment on file (though I don't think this is big > enough to have an issue). I do not have commit privileges, so if it is > deemed suitable for inclusion, someone else will have to do the deed. > > David > -- > David Taylor > dtaylor@emc.com > > Does GDB always want to stop the thread, even when "may-interrupt" is set to "off"?