GDB (xrefs)
|
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "infrun.h"
#include "target.h"
#include "gdbcore.h"
#include "command.h"
#include "completer.h"
#include "regcache.h"
#include "top.h"
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
#include <windows.h>
#include <imagehlp.h>
#include <algorithm>
#include <vector>
#include <queue>
#include "filenames.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdb_bfd.h"
#include "gdbsupport/gdb_obstack.h"
#include "gdbthread.h"
#include "gdbcmd.h"
#include <unistd.h>
#include "exec.h"
#include "solist.h"
#include "solib.h"
#include "xml-support.h"
#include "inttypes.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
#include "windows-tdep.h"
#include "windows-nat.h"
#include "x86-nat.h"
#include "complaints.h"
#include "inf-child.h"
#include "gdbsupport/gdb_tilde_expand.h"
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/gdb_wait.h"
#include "nat/windows-nat.h"
#include "gdbsupport/symbol.h"
#include "ser-event.h"
#include "inf-loop.h"
Go to the source code of this file.
Classes | |
struct | windows_solib |
struct | windows_per_inferior |
struct | windows_nat_target |
Macros | |
#define | __PMAX (MAX_PATH + 1) |
#define | STARTUPINFO STARTUPINFOA |
#define | CONTEXT_EXTENDED_REGISTERS 0 |
#define | CONTEXT_DEBUGGER_DR |
#define | DR6_CLEAR_VALUE 0xffff0ff0 |
#define | _CYGWIN_SIGNAL_STRING "cYgSiGw00f" |
#define | CHECK(x) check (x, __FILE__,__LINE__) |
#define | DEBUG_EXEC(fmt, ...) debug_prefixed_printf_cond (debug_exec, "windows exec", fmt, ## __VA_ARGS__) |
#define | DEBUG_EVENTS(fmt, ...) |
#define | DEBUG_MEM(fmt, ...) |
#define | DEBUG_EXCEPT(fmt, ...) |
Enumerations | |
enum | { FLAG_TRACE_BIT = 0x100 } |
Functions | |
static void | cygwin_set_dr (int i, CORE_ADDR addr) |
static void | cygwin_set_dr7 (unsigned long val) |
static CORE_ADDR | cygwin_get_dr (int i) |
static unsigned long | cygwin_get_dr6 (void) |
static unsigned long | cygwin_get_dr7 (void) |
static void | check (BOOL ok, const char *file, int line) |
static void | wait_for_single (HANDLE handle, DWORD howlong) |
static void | windows_init_thread_list (void) |
static void | windows_fetch_one_register (struct regcache *regcache, windows_thread_info *th, int r) |
static void | windows_store_one_register (const struct regcache *regcache, windows_thread_info *th, int r) |
static windows_solib * | windows_make_so (const char *name, LPVOID load_addr) |
static void | windows_clear_solib (void) |
static void | signal_event_command (const char *args, int from_tty) |
static int | display_selector (HANDLE thread, DWORD sel) |
static void | display_selectors (const char *args, int from_tty) |
static int | set_process_privilege (const char *privilege, BOOL enable) |
static void | windows_set_console_info (STARTUPINFO *si, DWORD *flags) |
static int | envvar_cmp (const void *a, const void *b) |
static int | redir_open (const char *redir_string, int *inp, int *out, int *err) |
static int | redir_set_redirection (const char *s, int *inp, int *out, int *err) |
static bool | redirect_inferior_handles (const char *cmd_orig, char *cmd, int *inp, int *out, int *err) |
static enum target_xfer_status | windows_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len) |
static enum target_xfer_status | windows_xfer_shared_libraries (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) |
static enum target_xfer_status | windows_xfer_siginfo (gdb_byte *readbuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) |
void | _initialize_windows_nat () |
void | _initialize_check_for_gdb_ini () |
Variables | |
static windows_per_inferior | windows_process |
static bool | new_console = false |
static bool | new_group = true |
static bool | debug_exec = false |
static bool | debug_events = false |
static bool | debug_memory = false |
static bool | debug_exceptions = false |
static bool | useshell = false |
#define __PMAX (MAX_PATH + 1) |
Definition at line 158 of file windows-nat.c.
Referenced by windows_nat_target::create_inferior(), redir_set_redirection(), and windows_make_so().
#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f" |
Definition at line 190 of file windows-nat.c.
Referenced by windows_per_inferior::handle_output_debug_string().
#define CHECK | ( | x | ) | check (x, __FILE__,__LINE__) |
Definition at line 193 of file windows-nat.c.
Referenced by windows_nat_target::fetch_registers(), windows_nat_target::get_windows_debug_event(), windows_nat_target::kill(), windows_nat_target::mourn_inferior(), windows_nat_target::resume(), and windows_nat_target::windows_continue().
#define CONTEXT_DEBUGGER_DR |
Definition at line 181 of file windows-nat.c.
Referenced by windows_nat_target::fetch_registers().
#define CONTEXT_EXTENDED_REGISTERS 0 |
Definition at line 178 of file windows-nat.c.
#define DEBUG_EVENTS | ( | fmt, | |
... ) |
Definition at line 196 of file windows-nat.c.
Referenced by windows_nat_target::close(), windows_nat_target::get_windows_debug_event(), windows_per_inferior::handle_load_dll(), windows_nat_target::interrupt(), and windows_init_thread_list().
#define DEBUG_EXCEPT | ( | fmt, | |
... ) |
Definition at line 202 of file windows-nat.c.
Referenced by windows_nat_target::resume().
#define DEBUG_EXEC | ( | fmt, | |
... ) debug_prefixed_printf_cond (debug_exec, "windows exec", fmt, ## __VA_ARGS__) |
Definition at line 194 of file windows-nat.c.
Referenced by windows_nat_target::resume().
#define DEBUG_MEM | ( | fmt, | |
... ) |
Definition at line 199 of file windows-nat.c.
Referenced by windows_xfer_memory().
#define DR6_CLEAR_VALUE 0xffff0ff0 |
Definition at line 185 of file windows-nat.c.
Referenced by windows_nat_target::resume(), and windows_nat_target::windows_continue().
#define STARTUPINFO STARTUPINFOA |
Definition at line 159 of file windows-nat.c.
Referenced by windows_nat_target::create_inferior().
anonymous enum |
Enumerator | |
---|---|
FLAG_TRACE_BIT |
Definition at line 169 of file windows-nat.c.
void _initialize_check_for_gdb_ini | ( | ) |
Definition at line 3233 of file windows-nat.c.
References inhibit_gdbinit.
void _initialize_windows_nat | ( | ) |
Definition at line 3059 of file windows-nat.c.
References add_cmd(), add_com(), add_inf_child_target(), add_setshow_boolean_cmd(), class_info, class_run, class_support, cygwin_get_dr(), cygwin_get_dr6(), cygwin_get_dr7(), cygwin_set_dr(), cygwin_set_dr7(), debug_events, debug_exceptions, debug_exec, debug_memory, display_selectors(), x86_dr_low_type::get_addr, x86_dr_low_type::get_control, x86_dr_low_type::get_status, info_w32_cmdlist, init_w32_command_list(), windows_nat::initialize_loadable(), new_console, new_group, x86_dr_low_type::set_addr, x86_dr_low_type::set_control, setlist, showlist, signal_event_command(), useshell, and x86_dr_low.
|
static |
Definition at line 392 of file windows-nat.c.
References err, and gdb_printf().
Referenced by build_id_verify(), gdbscm_value_to_real(), i386_skip_noop(), and load_progress().
|
static |
Definition at line 3193 of file windows-nat.c.
References windows_per_inferior::dr, and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 3202 of file windows-nat.c.
References windows_per_inferior::dr, and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 3212 of file windows-nat.c.
References windows_per_inferior::dr, and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 3168 of file windows-nat.c.
References windows_per_inferior::dr, windows_per_inferior::thread_list, and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 3182 of file windows-nat.c.
References windows_per_inferior::dr, windows_per_inferior::thread_list, and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 1068 of file windows-nat.c.
References BOOL, err, gdb_printf(), gdb_puts(), gdbarch::info(), windows_process, and Wow64GetThreadSelectorEntry.
Referenced by display_selectors().
|
static |
Definition at line 1153 of file windows-nat.c.
References windows_nat::windows_thread_info::context, display_selector(), windows_nat::DONT_INVALIDATE_CONTEXT, gdb_printf(), gdb_puts(), windows_nat::windows_thread_info::h, inferior_ptid, parse_and_eval_long(), windows_per_inferior::thread_rec(), and windows_process.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 2170 of file windows-nat.c.
Referenced by windows_nat_target::create_inferior().
|
static |
Definition at line 2278 of file windows-nat.c.
Referenced by redir_set_redirection().
|
static |
Definition at line 2372 of file windows-nat.c.
References __PMAX, err, and redir_open().
Referenced by redirect_inferior_handles().
|
static |
Definition at line 2447 of file windows-nat.c.
References err, and redir_set_redirection().
Referenced by windows_nat_target::create_inferior().
|
static |
Definition at line 1969 of file windows-nat.c.
References windows_nat::AdjustTokenPrivileges, enable, windows_nat::LookupPrivilegeValueA, windows_nat::OpenProcessToken, and size.
Referenced by windows_nat_target::attach().
|
static |
Definition at line 986 of file windows-nat.c.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 434 of file windows-nat.c.
References err.
Referenced by windows_nat_target::do_synchronously(), and windows_nat_target::process_thread().
|
static |
Definition at line 980 of file windows-nat.c.
References windows_per_inferior::solibs, and windows_process.
Referenced by windows_nat_target::do_initial_windows_stuff().
|
static |
Definition at line 645 of file windows-nat.c.
References reg_buffer::arch(), windows_nat::windows_thread_info::context, context_offset, gdbarch_decr_pc_after_break(), gdbarch_pc_regnum(), gdbarch_read_pc_p(), gdbarch_write_pc_p(), I387_FISEG_REGNUM, I387_FOP_REGNUM, windows_per_inferior::mappings, windows_nat::windows_thread_info::pc_adjusted, reg_buffer::raw_supply(), register_size(), windows_nat::windows_thread_info::reload_context, windows_per_inferior::segment_register_p, size, windows_nat::windows_thread_info::stopped_at_software_breakpoint, value, and windows_process.
Referenced by windows_nat_target::fetch_registers().
|
static |
Definition at line 592 of file windows-nat.c.
References DEBUG_EVENTS, windows_per_inferior::thread_list, and windows_process.
Referenced by windows_nat_target::attach(), and windows_nat_target::create_inferior().
|
static |
Definition at line 829 of file windows-nat.c.
References __PMAX, gdb_bfd_open(), L, windows_solib::load_addr, name, windows_solib::name, windows_solib::original_name, SO_NAME_MAX_PATH_SIZE, windows_per_inferior::solibs, and windows_process.
Referenced by windows_per_inferior::handle_load_dll().
|
static |
Definition at line 2135 of file windows-nat.c.
References flags, windows_nat::GetConsoleFontSize, and windows_nat::GetCurrentConsoleFont.
Referenced by windows_nat_target::create_inferior().
|
static |
Definition at line 791 of file windows-nat.c.
References windows_nat::windows_thread_info::context, windows_per_inferior::mappings, reg_buffer::raw_collect(), and windows_process.
Referenced by windows_nat_target::store_registers().
|
static |
Definition at line 2833 of file windows-nat.c.
References BOOL, DEBUG_MEM, windows_nat::windows_process_info::handle, TARGET_XFER_E_IO, TARGET_XFER_OK, and windows_process.
Referenced by windows_nat_target::xfer_partial().
|
static |
Definition at line 2905 of file windows-nat.c.
References windows_per_inferior::solibs, target_gdbarch(), TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, windows_process, and windows_xfer_shared_library().
Referenced by windows_nat_target::xfer_partial().
|
static |
Definition at line 2944 of file windows-nat.c.
References windows_nat::windows_process_info::siginfo_er, TARGET_XFER_E_IO, TARGET_XFER_OK, and windows_process.
Referenced by windows_nat_target::xfer_partial().
|
static |
Definition at line 219 of file windows-nat.c.
Referenced by _initialize_windows_nat(), windows_nat_target::get_windows_debug_event(), and windows_nat_target::windows_continue().
|
static |
Definition at line 221 of file windows-nat.c.
Referenced by _initialize_windows_nat(), and windows_nat_target::get_windows_debug_event().
|
static |
Definition at line 218 of file windows-nat.c.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 220 of file windows-nat.c.
Referenced by _initialize_windows_nat().
|
static |
Definition at line 213 of file windows-nat.c.
Referenced by _initialize_windows_nat(), and windows_nat_target::create_inferior().
|
static |
Definition at line 217 of file windows-nat.c.
Referenced by _initialize_windows_nat(), and windows_nat_target::create_inferior().
|
static |
Definition at line 222 of file windows-nat.c.
Referenced by _initialize_windows_nat(), and windows_nat_target::create_inferior().
|
static |
Definition at line 153 of file windows-nat.c.
Referenced by windows_nat_target::add_thread(), windows_nat_target::attach(), windows_nat_target::create_inferior(), cygwin_get_dr(), cygwin_get_dr6(), cygwin_get_dr7(), cygwin_set_dr(), cygwin_set_dr7(), windows_nat_target::delete_thread(), windows_nat_target::detach(), display_selector(), display_selectors(), windows_nat_target::do_initial_windows_stuff(), windows_nat_target::fake_create_process(), windows_nat_target::fetch_registers(), windows_nat_target::get_tib_address(), windows_nat_target::get_windows_debug_event(), windows_per_inferior::handle_unload_dll(), windows_nat_target::interrupt(), windows_nat_target::kill(), windows_nat_target::mourn_inferior(), windows_nat_target::pid_to_exec_file(), windows_nat_target::resume(), windows_nat_target::stopped_by_sw_breakpoint(), windows_nat_target::store_registers(), windows_nat_target::thread_alive(), windows_nat_target::thread_name(), windows_nat_target::wait(), windows_clear_solib(), windows_nat_target::windows_continue(), windows_fetch_one_register(), windows_init_thread_list(), windows_make_so(), windows_store_one_register(), windows_xfer_memory(), windows_xfer_shared_libraries(), and windows_xfer_siginfo().