GDB (xrefs)

Classes | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/windows-tdep.c File Reference
`#include "defs.h"`
`#include "windows-tdep.h"`
`#include "gdb_obstack.h"`
`#include "xml-support.h"`
`#include "gdbarch.h"`
`#include "target.h"`
`#include "value.h"`
`#include "inferior.h"`
`#include "command.h"`
`#include "gdbcmd.h"`
`#include "gdbthread.h"`
`#include "objfiles.h"`
`#include "symfile.h"`
`#include "coff-pe-read.h"`
`#include "gdb_bfd.h"`
`#include "complaints.h"`
`#include "solib.h"`
`#include "solib-target.h"`
`#include "gdbcore.h"`

Go to the source code of this file.

## Classes
struct | thread_information_block_32
struct | thread_information_block_64

## Typedefs
typedef struct thread_information_block_32 | thread_information_32
typedef struct thread_information_block_64 | thread_information_64

## Functions
static struct type * | windows_get_tlb_type (struct gdbarch *gdbarch)
static void | tlb_value_read (struct value *val)
static void | tlb_value_write (struct value *v, struct value *fromval)
static struct value * | tlb_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
static int | display_one_tib (ptid_t ptid)
static void | display_tib (const char *args, int from_tty)
void | windows_xfer_shared_library (const char *so_name, CORE_ADDR load_addr, struct gdbarch *gdbarch, struct obstack *obstack)
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)
static void | show_maint_show_all_tib (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void | info_w32_command (const char *args, int from_tty)
void | init_w32_command_list (void)
void | windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_windows_tdep (void)

## Variables
struct cmd_list_element * | info_w32_cmdlist
static const char * | TIB_NAME []
static const int | MAX_TIB32
static const int | MAX_TIB64
static const int | FULL_TIB_SIZE = 0x1000
static int | maint_display_all_tib = 0
static const struct lval_funcs | tlb_value_funcs
static int | w32_prefix_command_valid = 0
static const struct internalvar_funcs | tlb_funcs

## Typedef Documentation

## ◆ thread_information_32

typedef struct thread_information_block_32 thread_information_32

## ◆ thread_information_64

typedef struct thread_information_block_64 thread_information_64

## Function Documentation

## ◆ _initialize_windows_tdep()

void _initialize_windows_tdep | ( | void |  | ) |

Definition at line 494 of file windows-tdep.c.

References _, add_alias_cmd(), add_cmd(), add_setshow_boolean_cmd(), class_info, class_maintenance, create_internalvar_type_lazy(), display_tib(), info_w32_cmdlist, init_w32_command_list(), maint_display_all_tib, maintenance_set_cmdlist, maintenance_show_cmdlist, show_maint_show_all_tib(), and tlb_funcs.

## ◆ display_one_tib()

static int display_one_tib | ( | ptid_t | ptid | ) |
| static

Definition at line 295 of file windows-tdep.c.

References _, current_target, extract_unsigned_integer(), FULL_TIB_SIZE, gdbarch_byte_order(), gdbarch_ptr_bit(), maint_display_all_tib, MAX_TIB32, MAX_TIB64, paddress(), phex(), printf_filtered(), size, target_gdbarch(), target_get_tib_address, TARGET_OBJECT_MEMORY, target_pid_to_str(), target_read(), and TIB_NAME.

Referenced by display_tib().

## ◆ display_tib()

static void display_tib | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 368 of file windows-tdep.c.

References display_one_tib(), inferior_ptid, null_ptid, and ptid_equal().

Referenced by _initialize_windows_tdep().

## ◆ info_w32_command()

static void info_w32_command | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 447 of file windows-tdep.c.

References class_info, gdb_stdout, help_list(), and info_w32_cmdlist.

Referenced by init_w32_command_list().

## ◆ init_w32_command_list()

void init_w32_command_list | ( | void |  | ) |

Definition at line 454 of file windows-tdep.c.

References _, add_prefix_cmd(), class_info, info_w32_cmdlist, info_w32_command(), infolist, and w32_prefix_command_valid.

Referenced by _initialize_windows_nat(), and _initialize_windows_tdep().

## ◆ show_maint_show_all_tib()

static void show_maint_show_all_tib | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 439 of file windows-tdep.c.

References _, and fprintf_filtered().

Referenced by _initialize_windows_tdep().

## ◆ tlb_make_value()

static struct value* tlb_make_value | ( | struct gdbarch * | gdbarch,
|  | struct internalvar * | var,
|  | void * | ignore
| ) |  |
| static

Definition at line 280 of file windows-tdep.c.

References allocate_computed_value(), allocate_value(), inferior_ptid, null_ptid, ptid_equal(), target_has_stack, tlb_value_funcs, and windows_get_tlb_type().

## ◆ tlb_value_read()

static void tlb_value_read | ( | struct value * | val | ) |
| static

Definition at line 249 of file windows-tdep.c.

References _, check_typedef(), error(), inferior_ptid, store_typed_address(), target_get_tib_address, value_contents_raw(), and value_type().

## ◆ tlb_value_write()

static void tlb_value_write | ( | struct value * | v,
|  | struct value * | fromval
| ) |  |
| static

Definition at line 263 of file windows-tdep.c.

References _, and error().

## ◆ windows_get_tlb_type()

static struct type* windows_get_tlb_type | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 108 of file windows-tdep.c.

References append_composite_type_field(), arch_composite_type(), arch_integer_type(), arch_type(), gdbarch_ptr_bit(), lookup_pointer_type(), TARGET_CHAR_BIT, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_LENGTH, TYPE_NAME, and TYPE_TARGET_TYPE.

Referenced by tlb_make_value().

## ◆ windows_init_abi()

void windows_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch
| ) |  |

Definition at line 469 of file windows-tdep.c.

References set_gdbarch_has_dos_based_file_system(), set_gdbarch_iterate_over_objfiles_in_search_order(), set_gdbarch_wchar_bit(), set_gdbarch_wchar_signed(), set_solib_ops(), solib_target_so_ops, and windows_iterate_over_objfiles_in_search_order().

Referenced by amd64_windows_init_abi(), arm_wince_init_abi(), and i386_cygwin_init_abi().

## ◆ windows_iterate_over_objfiles_in_search_order()

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
| ) |  |
| static

Definition at line 413 of file windows-tdep.c.

References ALL_OBJFILES, and objfile::objfile().

Referenced by windows_init_abi().

## ◆ windows_xfer_shared_library()

void windows_xfer_shared_library | ( | const char * | so_name,
|  | CORE_ADDR | load_addr,
|  | struct gdbarch * | gdbarch,
|  | struct obstack * | obstack
| ) |  |

Definition at line 375 of file windows-tdep.c.

References gdb_bfd_open(), gdb::ref_ptr< T, Policy >::get(), gnutarget, obstack_grow_str, paddress(), pe_text_section_offset(), string, and xml_escape_text().

Referenced by core_process_module_section(), and windows_xfer_shared_libraries().

## Variable Documentation

## ◆ FULL_TIB_SIZE

const int FULL_TIB_SIZE = 0x1000
| static

Definition at line 101 of file windows-tdep.c.

Referenced by display_one_tib().

## ◆ info_w32_cmdlist

struct cmd_list_element* info_w32_cmdlist

Definition at line 38 of file windows-tdep.c.

Referenced by _initialize_windows_nat(), _initialize_windows_tdep(), info_w32_command(), and init_w32_command_list().

## ◆ maint_display_all_tib

int maint_display_all_tib = 0
| static

Definition at line 103 of file windows-tdep.c.

Referenced by _initialize_windows_tdep(), and display_one_tib().

## ◆ MAX_TIB32

const int MAX_TIB32
| static

Initial value:
=
sizeof (thread_information_32) / sizeof (uint32_t)
thread_information_32
struct thread_information_block_32 thread_information_32

Definition at line 97 of file windows-tdep.c.

Referenced by display_one_tib().

## ◆ MAX_TIB64

const int MAX_TIB64
| static

Initial value:
=
sizeof (thread_information_64) / sizeof (uint64_t)
thread_information_64
struct thread_information_block_64 thread_information_64

Definition at line 99 of file windows-tdep.c.

Referenced by display_one_tib().

## ◆ TIB_NAME

const char* TIB_NAME[]
| static

Initial value:
=
{
" current_seh ",
" current_top_of_stack ",
" current_bottom_of_stack ",
" sub_system_tib ",
" fiber_data ",
" arbitrary_data_slot ",
" linear_address_tib ",
" environment_pointer ",
" process_id ",
" current_thread_id ",
" active_rpc_handle ",
" thread_local_storage ",
" process_environment_block ",
" last_error_number "
}

Definition at line 79 of file windows-tdep.c.

Referenced by display_one_tib().

## ◆ tlb_funcs

const struct internalvar_funcs tlb_funcs
| static

Initial value:
=
{
tlb_make_value,
NULL,
NULL
}
tlb_make_value
static struct value * tlb_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
Definition: windows-tdep.c:280

Definition at line 486 of file windows-tdep.c.

Referenced by _initialize_windows_tdep().

## ◆ tlb_value_funcs

const struct lval_funcs tlb_value_funcs
| static

Initial value:
=
{
tlb_value_read,
tlb_value_write
}
tlb_value_read
static void tlb_value_read(struct value *val)
Definition: windows-tdep.c:249
tlb_value_write
static void tlb_value_write(struct value *v, struct value *fromval)
Definition: windows-tdep.c:263

Definition at line 268 of file windows-tdep.c.

Referenced by tlb_make_value().

## ◆ w32_prefix_command_valid

int w32_prefix_command_valid = 0
| static

Definition at line 452 of file windows-tdep.c.

Referenced by init_w32_command_list().