This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING] [RFC-v3] Add windows Thread Information Block
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Date: Thu, 11 Mar 2010 00:24:05 +0000
- Subject: Re: [PING] [RFC-v3] Add windows Thread Information Block
- References: <000901c9f5ef$4ee06f10$eca14d30$@u-strasbg.fr> <20090703194220.GA30668@ednor.casa.cgf.cx> <002901cac075$1f8f44b0$5eadce10$@muller@ics-cnrs.unistra.fr>
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;
Where did you get these offsets from?
According to <http://en.wikipedia.org/wiki/Win32_Thread_Information_Block>,
thread_local_storage should be 0x2c, and active_rpc_handle 0x28, as in,
someone has it swapped. I think I actually tested that wikipedia had it
right last time I asked you this, but in any case, can you confirm?
--
Pedro Alves