-/* Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
-static const int MAX_TIB32 = sizeof (thread_information_32) / sizeof (uint32_t);
-static const int MAX_TIB64 = sizeof (thread_information_64) / sizeof (uint64_t);
+static const int MAX_TIB32 =
+ sizeof (thread_information_32) / sizeof (uint32_t);
+static const int MAX_TIB64 =
+ sizeof (thread_information_64) / sizeof (uint64_t);
struct type *dword_ptr_type, *dword32_type, *void_ptr_type;
struct type *peb_ldr_type, *peb_ldr_ptr_type;
struct type *peb_type, *peb_ptr_type, *list_type, *list_ptr_type;
struct type *module_list_ptr_type;
struct type *tib_type, *seh_type, *tib_ptr_type, *seh_ptr_type;
struct type *dword_ptr_type, *dword32_type, *void_ptr_type;
struct type *peb_ldr_type, *peb_ldr_ptr_type;
struct type *peb_type, *peb_ptr_type, *list_type, *list_ptr_type;
struct type *module_list_ptr_type;
struct type *tib_type, *seh_type, *tib_ptr_type, *seh_ptr_type;
dword_ptr_type = arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch),
1, "DWORD_PTR");
dword32_type = arch_integer_type (gdbarch, 32,
dword_ptr_type = arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch),
1, "DWORD_PTR");
dword32_type = arch_integer_type (gdbarch, 32,
TYPE_TARGET_TYPE (seh_ptr_type) = seh_type;
append_composite_type_field (seh_type, "next_seh", seh_ptr_type);
TYPE_TARGET_TYPE (seh_ptr_type) = seh_type;
append_composite_type_field (seh_type, "next_seh", seh_ptr_type);
- append_composite_type_field (seh_type, "handler", void_ptr_type);
+ append_composite_type_field (seh_type, "handler",
+ builtin_type (gdbarch)->builtin_func_ptr);
/* struct _PEB_LDR_DATA */
peb_ldr_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
/* struct _PEB_LDR_DATA */
peb_ldr_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
/* uint32_t current_seh; %fs:0x0000 */
append_composite_type_field (tib_type, "current_seh", seh_ptr_type);
/* uint32_t current_top_of_stack; %fs:0x0004 */
/* uint32_t current_seh; %fs:0x0000 */
append_composite_type_field (tib_type, "current_seh", seh_ptr_type);
/* uint32_t current_top_of_stack; %fs:0x0004 */
/* uint32_t current_bottom_of_stack; %fs:0x0008 */
append_composite_type_field (tib_type, "current_bottom_of_stack",
void_ptr_type);
/* uint32_t current_bottom_of_stack; %fs:0x0008 */
append_composite_type_field (tib_type, "current_bottom_of_stack",
void_ptr_type);
/* uint32_t active_rpc_handle; %fs:0x0028 */
append_composite_type_field (tib_type, "active_rpc_handle", dword_ptr_type);
/* uint32_t thread_local_storage; %fs:0x002c */
/* uint32_t active_rpc_handle; %fs:0x0028 */
append_composite_type_field (tib_type, "active_rpc_handle", dword_ptr_type);
/* uint32_t thread_local_storage; %fs:0x002c */
/* uint32_t process_environment_block; %fs:0x0030 */
append_composite_type_field (tib_type, "process_environment_block",
peb_ptr_type);
/* uint32_t process_environment_block; %fs:0x0030 */
append_composite_type_field (tib_type, "process_environment_block",
peb_ptr_type);
TYPE_LENGTH (void_ptr_type), NULL);
TYPE_TARGET_TYPE (tib_ptr_type) = tib_type;
TYPE_LENGTH (void_ptr_type), NULL);
TYPE_TARGET_TYPE (tib_ptr_type) = tib_type;
if (target_read (¤t_target, TARGET_OBJECT_MEMORY,
NULL, tib, thread_local_base, tib_size) != tib_size)
{
if (target_read (¤t_target, TARGET_OBJECT_MEMORY,
NULL, tib, thread_local_base, tib_size) != tib_size)
{
target_pid_to_str (ptid),
paddress (target_gdbarch, thread_local_base));
return -1;
target_pid_to_str (ptid),
paddress (target_gdbarch, thread_local_base));
return -1;
obstack_grow_str (obstack, p);
xfree (p);
obstack_grow_str (obstack, "\"><segment address=\"");
obstack_grow_str (obstack, p);
xfree (p);
obstack_grow_str (obstack, "\"><segment address=\"");
obstack_grow_str (obstack, paddress (gdbarch, load_addr + 0x1000));
obstack_grow_str (obstack, "\"/></library>");
}
obstack_grow_str (obstack, paddress (gdbarch, load_addr + 0x1000));
obstack_grow_str (obstack, "\"/></library>");
}
show_maint_show_all_tib (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
show_maint_show_all_tib (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("Show all non-zero elements of Thread Information \
-Block is %s.\n"), value);
+ fprintf_filtered (file, _("Show all non-zero elements of "
+ "Thread Information Block is %s.\n"), value);