This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING] [RFC-v3] Add windows Thread Information Block


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]