GDB (xrefs)
|
#include "defs.h"
#include "windows-tdep.h"
#include "gdbsupport/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 "solib.h"
#include "solib-target.h"
#include "gdbcore.h"
#include "coff/internal.h"
#include "libcoff.h"
#include "solist.h"
Go to the source code of this file.
Classes | |
struct | thread_information_block_32 |
struct | thread_information_block_64 |
struct | windows_gdbarch_data |
struct | enum_value_name |
struct | pe_import_directory_entry |
struct | cpms_data |
Macros | |
#define | CYGWIN_DLL_NAME "cygwin1.dll" |
Typedefs | |
typedef struct thread_information_block_32 | thread_information_32 |
typedef struct thread_information_block_64 | thread_information_64 |
Functions | |
static struct windows_gdbarch_data * | get_windows_gdbarch_data (struct gdbarch *gdbarch) |
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, CORE_ADDR *text_offset_cached, struct gdbarch *gdbarch, struct obstack *obstack) |
static void | windows_iterate_over_objfiles_in_search_order (gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype cb, 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) |
void | init_w32_command_list (void) |
static int | windows_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) |
static int | cygwin_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) |
static struct type * | create_enum (struct gdbarch *gdbarch, int bit, const char *name, const struct enum_value_name *values, int count) |
static struct type * | windows_get_siginfo_type (struct gdbarch *gdbarch) |
static void | windows_solib_create_inferior_hook (int from_tty) |
static void | windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch) |
void | windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
void | cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
gdb_static_assert (sizeof(pe_import_directory_entry)==20) | |
bool | is_linked_with_cygwin_dll (bfd *abfd) |
static void | core_process_module_section (bfd *abfd, asection *sect, void *obj) |
ULONGEST | windows_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) |
std::string | windows_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) |
void | _initialize_windows_tdep () |
Variables | |
static constexpr unsigned int | NOTE_INFO_MODULE = 3 |
static constexpr unsigned int | NOTE_INFO_MODULE64 = 4 |
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 bool | maint_display_all_tib = false |
static const registry< gdbarch >::key< windows_gdbarch_data > | windows_gdbarch_data_handle |
static const struct lval_funcs | tlb_value_funcs |
static int | w32_prefix_command_valid = 0 |
static const struct enum_value_name | exception_values [] |
static const struct enum_value_name | violation_values [] |
static struct target_so_ops | windows_so_ops |
static const struct internalvar_funcs | tlb_funcs |
#define CYGWIN_DLL_NAME "cygwin1.dll" |
Definition at line 40 of file windows-tdep.c.
Referenced by is_linked_with_cygwin_dll().
typedef struct thread_information_block_32 thread_information_32 |
typedef struct thread_information_block_64 thread_information_64 |
anonymous enum |
Definition at line 49 of file windows-tdep.c.
anonymous enum |
Definition at line 72 of file windows-tdep.c.
void _initialize_windows_tdep | ( | ) |
Definition at line 1195 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.
|
static |
Definition at line 1095 of file windows-tdep.c.
References extract_unsigned_integer(), gdbarch_byte_order(), NOTE_INFO_MODULE, NOTE_INFO_MODULE64, and windows_xfer_shared_library().
Referenced by windows_core_xfer_shared_libraries().
|
static |
Definition at line 741 of file windows-tdep.c.
References type::alloc_fields(), bit, type::field(), name, type_allocator::new_type(), type::set_is_unsigned(), field::set_loc_enumval(), field::set_name(), and type.
Referenced by windows_get_siginfo_type().
|
static |
Definition at line 660 of file windows-tdep.c.
References CYGWIN_SIGABRT, CYGWIN_SIGALRM, CYGWIN_SIGBUS, CYGWIN_SIGCHLD, CYGWIN_SIGCONT, CYGWIN_SIGEMT, CYGWIN_SIGFPE, CYGWIN_SIGHUP, CYGWIN_SIGILL, CYGWIN_SIGINT, CYGWIN_SIGIO, CYGWIN_SIGKILL, CYGWIN_SIGLOST, CYGWIN_SIGPIPE, CYGWIN_SIGPROF, CYGWIN_SIGQUIT, CYGWIN_SIGSEGV, CYGWIN_SIGSTOP, CYGWIN_SIGSYS, CYGWIN_SIGTERM, CYGWIN_SIGTRAP, CYGWIN_SIGTSTP, CYGWIN_SIGTTIN, CYGWIN_SIGTTOU, CYGWIN_SIGURG, CYGWIN_SIGUSR1, CYGWIN_SIGUSR2, CYGWIN_SIGVTALRM, CYGWIN_SIGWINCH, CYGWIN_SIGXCPU, and CYGWIN_SIGXFSZ.
Referenced by cygwin_init_abi().
void cygwin_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch ) |
Definition at line 951 of file windows-tdep.c.
References cygwin_gdb_signal_to_target(), set_gdbarch_gdb_signal_to_target(), and windows_init_abi_common().
Referenced by amd64_cygwin_init_abi(), and i386_cygwin_init_abi().
|
static |
Definition at line 448 of file windows-tdep.c.
References current_inferior(), extract_unsigned_integer(), FULL_TIB_SIZE, gdb_printf(), gdbarch_byte_order(), gdbarch_ptr_bit(), maint_display_all_tib, MAX_TIB32, MAX_TIB64, paddress(), size, target_gdbarch(), target_get_tib_address(), TARGET_OBJECT_MEMORY, target_pid_to_str(), target_read(), and TIB_NAME.
Referenced by display_tib().
|
static |
Definition at line 521 of file windows-tdep.c.
References display_one_tib(), and inferior_ptid.
Referenced by _initialize_windows_tdep().
gdb_static_assert | ( | sizeof(pe_import_directory_entry) | = =20 | ) |
|
static |
Definition at line 191 of file windows-tdep.c.
References registry< T >::get(), and windows_gdbarch_data_handle.
Referenced by windows_get_siginfo_type(), and windows_get_tlb_type().
void init_w32_command_list | ( | void | ) |
Definition at line 602 of file windows-tdep.c.
References add_basic_prefix_cmd(), class_info, info_w32_cmdlist, infolist, and w32_prefix_command_valid.
Referenced by _initialize_windows_nat(), and _initialize_windows_tdep().
bool is_linked_with_cygwin_dll | ( | bfd * | abfd | ) |
Definition at line 984 of file windows-tdep.c.
References CYGWIN_DLL_NAME, gdb_bfd_get_full_section_contents(), name, and pe_import_directory_entry::name_rva.
Referenced by amd64_windows_osabi_sniffer(), and i386_windows_osabi_sniffer().
|
static |
Definition at line 592 of file windows-tdep.c.
References gdb_printf().
Referenced by _initialize_windows_tdep().
|
static |
Definition at line 433 of file windows-tdep.c.
References value::allocate(), value::allocate_computed(), inferior_ptid, target_has_stack(), tlb_value_funcs, and windows_get_tlb_type().
|
static |
Definition at line 402 of file windows-tdep.c.
References check_typedef(), value::contents_raw(), inferior_ptid, store_typed_address(), target_get_tib_address(), and value::type().
Definition at line 416 of file windows-tdep.c.
std::string windows_core_pid_to_str | ( | struct gdbarch * | gdbarch, |
ptid_t | ptid ) |
Definition at line 1185 of file windows-tdep.c.
References normal_pid_to_str().
Referenced by amd64_windows_init_abi_common(), and i386_windows_init_abi_common().
ULONGEST windows_core_xfer_shared_libraries | ( | struct gdbarch * | gdbarch, |
gdb_byte * | readbuf, | ||
ULONGEST | offset, | ||
ULONGEST | len ) |
Definition at line 1153 of file windows-tdep.c.
References core_bfd, core_process_module_section(), cpms_data::gdbarch, and cpms_data::obstack.
Referenced by amd64_windows_init_abi_common(), and i386_windows_init_abi_common().
|
static |
Definition at line 617 of file windows-tdep.c.
References WINDOWS_SIGABRT, WINDOWS_SIGALRM, WINDOWS_SIGBUS, WINDOWS_SIGEMT, WINDOWS_SIGFPE, WINDOWS_SIGHUP, WINDOWS_SIGILL, WINDOWS_SIGINT, WINDOWS_SIGKILL, WINDOWS_SIGPIPE, WINDOWS_SIGQUIT, WINDOWS_SIGSEGV, WINDOWS_SIGSYS, WINDOWS_SIGTERM, and WINDOWS_SIGTRAP.
Referenced by windows_init_abi().
Definition at line 800 of file windows-tdep.c.
References append_composite_type_field(), append_composite_type_field_aligned(), arch_composite_type(), create_enum(), exception_values, gdbarch_int_bit(), gdbarch_ptr_bit(), get_windows_gdbarch_data(), init_integer_type(), init_pointer_type(), type::length(), lookup_array_range_type(), windows_gdbarch_data::siginfo_type, and violation_values.
Referenced by windows_init_abi_common().
Definition at line 202 of file windows-tdep.c.
References append_composite_type_field(), append_composite_type_field_aligned(), arch_composite_type(), gdbarch_ptr_bit(), get_windows_gdbarch_data(), init_integer_type(), init_pointer_type(), type::length(), lookup_pointer_type(), type_allocator::new_type(), type::set_name(), type::set_target_type(), and windows_gdbarch_data::tib_ptr_type.
Referenced by tlb_make_value().
void windows_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch ) |
Definition at line 942 of file windows-tdep.c.
References set_gdbarch_gdb_signal_to_target(), windows_gdb_signal_to_target(), and windows_init_abi_common().
Referenced by amd64_windows_init_abi(), arm_wince_init_abi(), and i386_windows_init_abi().
|
static |
Definition at line 920 of file windows-tdep.c.
References set_gdbarch_get_siginfo_type(), set_gdbarch_has_dos_based_file_system(), set_gdbarch_iterate_over_objfiles_in_search_order(), set_gdbarch_so_ops(), set_gdbarch_wchar_bit(), set_gdbarch_wchar_signed(), target_so_ops::solib_create_inferior_hook, solib_target_so_ops, windows_get_siginfo_type(), windows_iterate_over_objfiles_in_search_order(), windows_so_ops, and windows_solib_create_inferior_hook().
Referenced by cygwin_init_abi(), and windows_init_abi().
|
static |
Definition at line 573 of file windows-tdep.c.
References current_program_space, and program_space::objfiles().
Referenced by windows_init_abi_common().
|
static |
Definition at line 869 of file windows-tdep.c.
References current_program_space, program_space::exec_bfd(), extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_ptr_bit(), inferior_ptid, objfile_rebase(), program_space::symfile_object_file, target_gdbarch(), target_get_tib_address(), target_has_execution(), and target_read_memory().
Referenced by windows_init_abi_common().
void windows_xfer_shared_library | ( | const char * | so_name, |
CORE_ADDR | load_addr, | ||
CORE_ADDR * | text_offset_cached, | ||
struct gdbarch * | gdbarch, | ||
struct obstack * | obstack ) |
Definition at line 528 of file windows-tdep.c.
References gdb_bfd_open(), gnutarget, paddress(), and pe_text_section_offset().
Referenced by core_process_module_section(), and windows_xfer_shared_libraries().
|
static |
Definition at line 760 of file windows-tdep.c.
Referenced by windows_get_siginfo_type().
|
static |
Definition at line 174 of file windows-tdep.c.
Referenced by display_one_tib().
struct cmd_list_element* info_w32_cmdlist |
Definition at line 111 of file windows-tdep.c.
Referenced by _initialize_windows_nat(), _initialize_windows_tdep(), and init_w32_command_list().
|
static |
Definition at line 176 of file windows-tdep.c.
Referenced by _initialize_windows_tdep(), and display_one_tib().
|
static |
Definition at line 170 of file windows-tdep.c.
Referenced by display_one_tib().
|
static |
Definition at line 172 of file windows-tdep.c.
Referenced by display_one_tib().
|
staticconstexpr |
Definition at line 108 of file windows-tdep.c.
Referenced by core_process_module_section().
|
staticconstexpr |
Definition at line 109 of file windows-tdep.c.
Referenced by core_process_module_section().
|
static |
Definition at line 152 of file windows-tdep.c.
Referenced by display_one_tib().
|
static |
Definition at line 959 of file windows-tdep.c.
Referenced by _initialize_windows_tdep().
|
static |
Definition at line 421 of file windows-tdep.c.
Referenced by tlb_make_value().
|
static |
Definition at line 790 of file windows-tdep.c.
Referenced by windows_get_siginfo_type().
|
static |
Definition at line 600 of file windows-tdep.c.
Referenced by init_w32_command_list().
|
static |
Definition at line 186 of file windows-tdep.c.
Referenced by get_windows_gdbarch_data().
|
static |
Definition at line 914 of file windows-tdep.c.
Referenced by windows_init_abi_common().