82 " current_top_of_stack ",
83 " current_bottom_of_stack ",
86 " arbitrary_data_slot ",
87 " linear_address_tib ",
88 " environment_pointer ",
90 " current_thread_id ",
91 " active_rpc_handle ",
92 " thread_local_storage ",
93 " process_environment_block ",
99 static const int MAX_TIB64 =
101 static const int FULL_TIB_SIZE = 0x1000;
103 static int maint_display_all_tib = 0;
110 static struct gdbarch *last_gdbarch = NULL;
111 static struct type *last_tlb_type = NULL;
112 struct type *dword_ptr_type, *dword32_type, *void_ptr_type;
113 struct type *peb_ldr_type, *peb_ldr_ptr_type;
114 struct type *peb_type, *peb_ptr_type, *list_type, *list_ptr_type;
115 struct type *module_list_ptr_type;
116 struct type *tib_type, *seh_type, *tib_ptr_type, *seh_ptr_type;
119 if (last_tlb_type && last_gdbarch == gdbarch)
120 return last_tlb_type;
131 TYPE_NAME (list_type) = xstrdup (
"list");
136 module_list_ptr_type = void_ptr_type;
139 module_list_ptr_type);
141 module_list_ptr_type);
158 TYPE_NAME (peb_ldr_type) = xstrdup (
"peb_ldr_data");
233 last_tlb_type = tib_ptr_type;
234 last_gdbarch = gdbarch;
254 error (
_(
"Unable to read tlb"));
264 error (
_(
"Impossible to change the Thread Local Base"));
278 static struct value *
303 if (sizeof_ptr == 64)
305 size =
sizeof (uint64_t);
311 size =
sizeof (uint32_t);
318 if (maint_display_all_tib)
321 max = tib_size /
size;
324 tib = alloca (tib_size);
334 NULL, tib, thread_local_base, tib_size) != tib_size)
337 "block for %s at address %s\n"),
351 for (i = 0; i <
max; i++)
381 error (
_(
"Thread ID %d not known."), gdb_id);
384 error (
_(
"Thread ID %d has terminated."), gdb_id);
394 struct gdbarch *gdbarch,
struct obstack *obstack)
435 (
struct gdbarch *gdbarch,
437 void *cb_data,
struct objfile *current_objfile)
444 stop = cb (current_objfile, cb_data);
451 if (objfile != current_objfile)
453 stop = cb (objfile, cb_data);
465 "Thread Information Block is %s.\n"), value);
474 static int w32_prefix_command_valid = 0;
478 if (!w32_prefix_command_valid)
481 _(
"Print information specific to Win32 debugging."),
482 &info_w32_cmdlist,
"info w32 ", 0, &
infolist);
483 w32_prefix_command_valid = 1;
520 _(
"Display thread information block."),
526 &maint_display_all_tib,
_(
"\
527 Set whether to display all non-zero fields of thread information block."),
_(
"\
528 Show whether to display all non-zero fields of thread information block."),
_(
"\
529 Use \"on\" to enable, \"off\" to disable.\n\
530 If enabled, all non-zero fields of thread information block are displayed,\n\
531 even if their meaning is unknown."),
struct gdbarch * target_gdbarch(void)
CORE_ADDR pe_text_section_offset(struct bfd *abfd)
int target_thread_alive(ptid_t ptid)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
struct thread_info * find_thread_id(int num)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
LONGEST value_as_long(struct value *val)
void set_solib_ops(struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
#define TYPE_NAME(thistype)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
struct ui_file * gdb_stdout
char * phex(ULONGEST l, int sizeof_l)
static struct type * windows_get_tlb_type(struct gdbarch *gdbarch)
struct type * arch_composite_type(struct gdbarch *gdbarch, char *name, enum type_code code)
char * target_pid_to_str(ptid_t ptid)
struct bfd * gdb_bfd_open(const char *name, const char *target, int fd)
char * xml_escape_text(const char *text)
struct value * allocate_value(struct type *type)
struct cmd_list_element * maintenance_set_cmdlist
void printf_filtered(const char *format,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
struct target_so_ops solib_target_so_ops
struct cmd_list_element * infolist
int( iterate_over_objfiles_in_search_order_cb_ftype)(struct objfile *objfile, void *cb_data)
#define ALL_OBJFILES(obj)
struct type * check_typedef(struct type *type)
void set_gdbarch_iterate_over_objfiles_in_search_order(struct gdbarch *gdbarch, gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
static const int MAX_TIB64
struct target_ops current_target
void gdb_bfd_unref(struct bfd *abfd)
#define target_get_tib_address(ptid, addr)
void initialize_file_ftype(void)
struct value * allocate_computed_value(struct type *type, const struct lval_funcs *funcs, void *closure)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static void tlb_value_read(struct value *val)
static void tlb_value_write(struct value *v, struct value *fromval)
struct thread_information_block_32 thread_information_32
static const char * TIB_NAME[]
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static void display_tib(char *args, int from_tty)
static int display_one_tib(ptid_t ptid)
struct cmd_list_element * info_w32_cmdlist
struct cmd_list_element * add_alias_cmd(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct type * arch_integer_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
static void windows_iterate_over_objfiles_in_search_order(struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
void append_composite_type_field(struct type *t, char *name, struct type *field)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
static void show_maint_show_all_tib(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define TYPE_TARGET_TYPE(thistype)
static struct value * tlb_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
void windows_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
struct thread_information_block_64 thread_information_64
#define obstack_grow_str(OBSTACK, STRING)
static void info_w32_command(char *args, int from_tty)
initialize_file_ftype _initialize_windows_tdep
struct value * parse_and_eval(const char *exp)
unsigned long long ULONGEST
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static const int MAX_TIB32
struct type * value_type(const struct value *value)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
gdb_byte * value_contents_raw(struct value *value)
#define TYPE_LENGTH(thistype)
void store_typed_address(gdb_byte *buf, struct type *type, CORE_ADDR addr)
struct type * arch_type(struct gdbarch *gdbarch, enum type_code code, int length, char *name)
static const int FULL_TIB_SIZE
void set_gdbarch_has_dos_based_file_system(struct gdbarch *gdbarch, int has_dos_based_file_system)
struct cmd_list_element * maintenance_show_cmdlist
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
void error(const char *fmt,...)
void init_w32_command_list(void)
struct type * lookup_pointer_type(struct type *type)
void windows_xfer_shared_library(const char *so_name, CORE_ADDR load_addr, struct gdbarch *gdbarch, struct obstack *obstack)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)