From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8765 invoked by alias); 1 Apr 2010 16:17:42 -0000 Received: (qmail 8732 invoked by uid 22791); 1 Apr 2010 16:17:39 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Apr 2010 16:17:33 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o31GHR9t077309 ; Thu, 1 Apr 2010 18:17:28 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o31GHRpN068948 ; Thu, 1 Apr 2010 18:17:27 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o31GHRNx043836 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 1 Apr 2010 18:17:27 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <000901c9f5ef$4ee06f10$eca14d30$@u-strasbg.fr> <201003101725.48298.pedro@codesourcery.com> <000c01cac0a0$3935fbe0$aba1f3a0$%muller@ics-cnrs.unistra.fr> <201003110000.31184.pedro@codesourcery.com> <002101cac0f2$a2298890$e67c99b0$%muller@ics-cnrs.unistra.fr> <000e01cac488$27dcf970$7796ec50$%muller@ics-cnrs.unistra.fr> <001201cad17f$6a058980$3e109c80$%muller@ics-cnrs.unistra.fr> <838w97xpui.fsf@gnu.org> In-Reply-To: <838w97xpui.fsf@gnu.org> Subject: RE: [PING][RFC-v4] Add windows OS Thread Information Block Date: Thu, 01 Apr 2010 16:17:00 -0000 Message-ID: <003c01cad1b6$d69e44b0$83dace10$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2010-04/txt/msg00021.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: Thursday, April 01, 2010 3:30 PM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [PING][RFC-v4] Add windows OS Thread Information Block >=20 > > From: "Pierre Muller" > > Date: Thu, 1 Apr 2010 11:40:50 +0200 > > > > I am still waiting for a comment from any global > > maintainer concerning the non-(windows specific) parts > > of that patch. Christopher approved the windows part. >=20 > Sorry I missed that. >=20 > > > + if (target_get_tib_address (ptid, &thread_local_base) =3D=3D 0) > > > + { > > > + printf_filtered ("Unable to get thread local base for > ThreadId > > > %s\n", > > > + pulongest (ptid_get_tid(ptid))); >=20 > Please add _() around the user messages. OK.=20 > > > + add_prefix_cmd ("w32", class_info, info_w32_command, > > > + _("Print information specific to Win32 debugging."), >=20 > RMS would say "don't call Windows ``a win''". This is just displaced code from windows-nat.c to windows-tdep.c, so I am not sure I should touch this. =20 > > > +If enabled, all non-zero fields of thread information block are > displayed,\n\ > > > +even if its meaning is unknown."), >=20 > "its" is inappropriate here, as "fields" are in plural. I suggest > "their" instead. I completely agree with you! > > > +@item $_tlb > > > +@vindex $_tlb@r{, convenience variable} > > > +The variable @code{$_tlb} is automatically set for Windows OS > running > > > +applications in native mode or connected to a gdbserver that > supports >=20 > This is backwards: it makes it sound like we set the variable for > Windows, not for the application. I suggest the following alternative > wording: >=20 > The variable @code{$_tlb} is automatically set when debugging > applications running on MS-Windows in native mode or connected to > gdbserver that supports the @code{qGetTIBAddr} request. >=20 > Please also add an @xref to where the qGetTIBAddr packet is > described. The node I found is called "General Query Packets", should I refer to this general section, or add a new node just for qGetTIBAddr? =20 > > > +@code{qGetTIBAddr} requests. This variable contains the address of > the > ^^ > Two spaces between sentences, please. Disappeared with my @xref addition.=20 > > > +@tab Display Windows OS Thread Information Block. >=20 > "Display MS-Windows Thread Information Block." OK.=20 > > > +An error occured. This means that either the thread was not found, > or > ^^ > Two spaces. Done.=20 > The patch for the manual is okay with the above changes. =20=20 Thanks, I attach the modified doc/gdb.texinfo diff Pierre $ cvs diff -u doc/gdb.texinfo Index: doc/gdb.texinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.693 diff -u -r1.693 gdb.texinfo --- doc/gdb.texinfo 1 Apr 2010 14:11:23 -0000 1.693 +++ doc/gdb.texinfo 1 Apr 2010 16:07:57 -0000 @@ -8055,6 +8055,15 @@ (@pxref{extra signal information}). Note that @code{$_siginfo} could be empty, if the application has not yet received any signals. For example, it will be empty before you execute the @code{run} command. + +@item $_tlb +@vindex $_tlb@r{, convenience variable} +The variable @code{$_tlb} is automatically set when debugging +applications running on MS-Windows in native mode or connected to +gdbserver that supports the @code{qGetTIBAddr} request. +@xref{General Query Packets}. +This variable contains the address of the thread information block. + @end table On HP-UX systems, if you refer to a function or variable name that @@ -15730,6 +15739,10 @@ @tab @code{qGetTLSAddr} @tab Displaying @code{__thread} variables +@item @code{w32 thread-information-block} +@tab @code{qGetTIBAddr} +@tab Display MS-Windows Thread Information Block. + @item @code{search-memory} @tab @code{qSearch:memory} @tab @code{find} @@ -16509,6 +16522,11 @@ Without argument, this command displays information about the six segment registers. +@item info w32 thread-information-block +This command displays thread specific information stored in the +Thread Information Block (readable using @code{$fs} selector for 32-bit +programs and @code{$gs} for 64-bit programs). + @kindex info dll @item info dll This is a Cygwin-specific alias of @code{info shared}. @@ -29174,6 +29192,14 @@ removes a hardware breakpoint or watchpoint, and when the inferior triggers a hardware-assisted breakpoint or watchpoint. +@kindex maint set show-all-tib +@kindex maint show show-all-tib +@item maint set show-all-tib +@itemx maint show show-all-tib +Control whether to show all non zero areas within a 1k block starting +at thread local base, when using @samp{info w32 thread-information-block} +command. + @kindex maint space @cindex memory used by commands @item maint space @@ -30387,6 +30413,28 @@ An empty reply indicates that @samp{qGetTLSAddr} is not supported by the stub. @end table +@item qGetTIBAddr:@var{thread-id}: +@cindex get thread information block address +@cindex @samp{qGetTIBAddr} packet +Fetch address of the Windows OS specific Thread Information Block. + +@var{thread-id} is the thread ID associated with the thread. + +Reply: +@table @samp +@item @var{XX}@dots{} +Hex encoded (big endian) bytes representing the linear address of the +thread information block. + +@item E @var{nn} +An error occured. This means that either the thread was not found, or the +address could not be retrieved. + +@item +An empty reply indicates that @samp{qGetTIBAddr} is not supported by the stub. +@end table + + @item qL @var{startflag} @var{threadcount} @var{nextthread} Obtain thread information from RTOS. Where: @var{startflag} (one hex digit) is one to indicate the first query and zero to indicate a