From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23861 invoked by alias); 11 Mar 2010 08:01:47 -0000 Received: (qmail 23779 invoked by uid 22791); 11 Mar 2010 08:01:45 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,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.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Mar 2010 08:01:37 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id o2B81RQ4059675 ; Thu, 11 Mar 2010 09:01:27 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms3.u-strasbg.fr [IPv6:2001:660:2402:d::12]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o2B81Q9k009247 ; Thu, 11 Mar 2010 09:01:27 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o2B81PON065374 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 11 Mar 2010 09:01:26 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" , References: <000901c9f5ef$4ee06f10$eca14d30$@u-strasbg.fr> <20090703194220.GA30668@ednor.casa.cgf.cx> <002901cac075$1f8f44b0$5eadce10$@muller@ics-cnrs.unistra.fr> <201003110024.05957.pedro@codesourcery.com> In-Reply-To: <201003110024.05957.pedro@codesourcery.com> Subject: RE: [PING] [RFC-v3] Add windows Thread Information Block Date: Thu, 11 Mar 2010 08:01:00 -0000 Message-ID: <001501cac0f1$0d2154e0$2763fea0$@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-03/txt/msg00411.txt.bz2 Hi Pedro, > -----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, March 11, 2010 1:24 AM > =C0=A0: gdb-patches@sourceware.org > Cc=A0: Pierre Muller > Objet=A0: Re: [PING] [RFC-v3] Add windows Thread Information Block >=20 > On Wednesday 10 March 2010 17:14:19, Pierre Muller wrote: > > +typedef struct thread_information_block_32 > > + { > > + uint32_t current_seh; /* %fs:0x0000 */ > > + uint32_t current_top_of_stack; /* %fs:0x0004 */ > > + uint32_t current_bottom_of_stack; /* %fs:0x0008 */ > > + uint32_t sub_system_tib; /* %fs:0x000c */ > > + uint32_t fiber_data; /* %fs:0x0010 */ > > + uint32_t arbitrary_data_slot; /* %fs:0x0014 */ > > + uint32_t linear_address_tib; /* %fs:0x0018 */ > > + uint32_t environment_pointer; /* %fs:0x001c */ > > + uint32_t process_id; /* %fs:0x0020 */ > > + uint32_t current_thread_id; /* %fs:0x0024 > */ > > + uint32_t thread_local_storage; /* %fs:0x0028 */ > > + uint32_t active_rpc_handle; /* %fs:0x002c > */ > > + uint32_t process_environment_block; /* %fs:0x0030 > */ > > + uint32_t last_error_number; /* %fs:0x0034 > */ > > + } > > +thread_information_32; >=20 > Where did you get these offsets from? > According to > , > thread_local_storage should be 0x2c, and active_rpc_handle 0x28, as in, > someone has it swapped. Strange because, IIRC, this is the source where I got the offsets too... > I think I actually tested that wikipedia had > it > right last time I asked you this, but in any case, can you confirm? I checked it on gdb itself, but both fields are zeroed. Now I remember having read somewhere that=20 for newer Windows OS, the Thread Local Storage block is inside the=20 Thread Information block itself: see same Wikipedia page: address : FS[0xE10] length : 256 description : TLS slots, 4 bytes per slot so I will need to check on an older Win9X virtual machine before I can answer this question. Pierre