From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22143 invoked by alias); 1 Apr 2010 13:31:19 -0000 Received: (qmail 22127 invoked by uid 22791); 1 Apr 2010 13:31:18 -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.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Apr 2010 13:31:13 +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 o31DV7Yi039970 ; Thu, 1 Apr 2010 15:31:07 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o31DV61l087385 ; Thu, 1 Apr 2010 15:31:06 +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 o31DV6BF073770 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 1 Apr 2010 15:31:06 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" Cc: References: <000901c9f5ef$4ee06f10$eca14d30$@u-strasbg.fr> <201004011221.36972.pedro@codesourcery.com> <001801cad19a$cbcc40d0$6364c270$@muller@ics-cnrs.unistra.fr> <201004011421.17006.pedro@codesourcery.com> In-Reply-To: <201004011421.17006.pedro@codesourcery.com> Subject: RE: [RFC-v5] Add windows OS Thread Information Block Date: Thu, 01 Apr 2010 13:31:00 -0000 Message-ID: <001b01cad19f$98b25630$ca170290$@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/msg00013.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pedro Alves > Envoy=E9=A0: Thursday, April 01, 2010 3:21 PM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFC-v5] Add windows OS Thread Information Block >=20 > On Thursday 01 April 2010 13:56:50, Pierre Muller wrote: > > > Does the new packet return the TIB, or the TLB? > > The thread local base is the address of > > the Thread Information Block which itself > > is a block of memory (usually of size 0x1000) > > containing thread specific information. >=20 > Okay, thanks, that makes the terminology clearer. >=20 > > > The object is $_tlb now, isn't it? > > This object is a pointer in debuggee memory > > to the Thread Information Block. >=20 > If the TLB is a pointer to the TIB, then if "ptype $_tlb" shows > something not a pointer, something isn't right, wouldn't > you say? Isn't "ptype $_tlb"/"p $_tib" printing the _TIB_ > instead? This is where things are still confusing. (top-gdb) start Temporary breakpoint 3 at 0x40107a: file ../../src/gdb/gdb.c, line 28. Starting program: /usr/local/src/gdbcvs/build-norm/gdb/gdb.exe [New Thread 5136.0x16b4] [New Thread 5136.0x2b4] Temporary breakpoint 3, main (argc=3D1, argv=3D0x1d82428) at ../../src/gdb/gdb.c:28 28 memset (&args, 0, sizeof args); (top-gdb) p $_tlb $3 =3D (tib *) 0x7ffdf000 (top-gdb) ptyp $_tlb type =3D struct { seh *current_seh; void *current_top_of_stack; void *current_bottom_of_stack; void *sub_system_tib; void *fiber_data; void *arbitrary_data_slot; void *linear_address_tib; void *environment_pointer; DWORD_PTR process_id; DWORD_PTR thread_id; DWORD_PTR active_rpc_handle; void *thread_local_storage; peb *process_environment_block; DWORD_PTR last_error_number; } * This seems correct to me. =20 > > +@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 > > +@code{qGetTIBAddr} requests. This variable contains the address of > the > > thread > > +information block. >=20 > Does the variable really contain an address? I hope the output above is enough to convince you, to get the display of the Thread information Block you need to use p *$_tlb Pierre