GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/windows-nat.c File Reference
`#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 <psapi.h>`
`#include <algorithm>`
`#include "buildsym.h"`
`#include "filenames.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "gdb_bfd.h"`
`#include "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 "gdb_tilde_expand.h"`

Go to the source code of this file.

## Classes
struct | windows_thread_info_struct
struct | xlate_exception
struct | safe_symbol_file_add_args
struct | lm_info_windows

## Macros
#define | AdjustTokenPrivileges dyn_AdjustTokenPrivileges
#define | DebugActiveProcessStop dyn_DebugActiveProcessStop
#define | DebugBreakProcess dyn_DebugBreakProcess
#define | DebugSetProcessKillOnExit dyn_DebugSetProcessKillOnExit
#define | EnumProcessModules dyn_EnumProcessModules
#define | GetModuleInformation dyn_GetModuleInformation
#define | LookupPrivilegeValueA dyn_LookupPrivilegeValueA
#define | OpenProcessToken dyn_OpenProcessToken
#define | GetConsoleFontSize dyn_GetConsoleFontSize
#define | GetCurrentConsoleFont dyn_GetCurrentConsoleFont
#define | __PMAX (MAX_PATH + 1)
#define | STARTUPINFO STARTUPINFOA
#define | CreateProcess CreateProcessA
#define | GetModuleFileNameEx_name "GetModuleFileNameExA"
#define | bad_GetModuleFileNameEx bad_GetModuleFileNameExA
#define | CONTEXT_EXTENDED_REGISTERS 0
#define | CONTEXT_DEBUGGER_DR
#define | DR6_CLEAR_VALUE 0xffff0ff0
#define | MS_VC_EXCEPTION 0x406d1388
#define | _CYGWIN_SIGNAL_STRING "cYgSiGw00f"
#define | CHECK(x) check (x, __FILE__,__LINE__)
#define | DEBUG_EXEC(x) if (debug_exec) printf_unfiltered x
#define | DEBUG_EVENTS(x) if (debug_events) printf_unfiltered x
#define | DEBUG_MEM(x) if (debug_memory) printf_unfiltered x
#define | DEBUG_EXCEPT(x) if (debug_exceptions) printf_unfiltered x
#define | DEBUG_EXCEPTION_SIMPLE(x)
#define | GPA(m, func) func = (func ## _ftype *) GetProcAddress (m, #func)

## Typedefs
typedef BOOL WINAPI() | AdjustTokenPrivileges_ftype(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD)
typedef BOOL WINAPI() | DebugActiveProcessStop_ftype(DWORD)
typedef BOOL WINAPI() | DebugBreakProcess_ftype(HANDLE)
typedef BOOL WINAPI() | DebugSetProcessKillOnExit_ftype(BOOL)
typedef BOOL WINAPI() | EnumProcessModules_ftype(HANDLE, HMODULE *, DWORD, LPDWORD)
typedef BOOL WINAPI() | GetModuleInformation_ftype(HANDLE, HMODULE, LPMODULEINFO, DWORD)
typedef BOOL WINAPI() | LookupPrivilegeValueA_ftype(LPCSTR, LPCSTR, PLUID)
typedef BOOL WINAPI() | OpenProcessToken_ftype(HANDLE, DWORD, PHANDLE)
typedef BOOL WINAPI() | GetCurrentConsoleFont_ftype(HANDLE, BOOL, CONSOLE_FONT_INFO *)
typedef COORD WINAPI() | GetConsoleFontSize_ftype(HANDLE, DWORD)
typedef DWORD WINAPI() | GetModuleFileNameEx_ftype(HANDLE, HMODULE, LPSTR, DWORD)
typedef struct windows_thread_info_struct | windows_thread_info

## Enumerations
enum | { FLAG_TRACE_BIT = 0x100 }
enum | handle_exception_result { HANDLE_EXCEPTION_UNHANDLED = 0, HANDLE_EXCEPTION_HANDLED, HANDLE_EXCEPTION_IGNORED }

## Functions
static void | windows_interrupt (struct target_ops *self, ptid_t)
static int | windows_thread_alive (struct target_ops *, ptid_t)
static void | windows_kill_inferior (struct target_ops *)
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)
void | windows_set_context_register_offsets (const int *offsets)
void | windows_set_segment_register_p (segment_register_p_ftype *fun)
static void | check (BOOL ok, const char *file, int line)
static windows_thread_info * | thread_rec (DWORD id, int get_context)
static windows_thread_info * | windows_add_thread (ptid_t ptid, HANDLE h, void *tlb)
static void | windows_init_thread_list (void)
static void | windows_delete_thread (ptid_t ptid, DWORD exit_code)
static void | do_windows_fetch_inferior_registers (struct regcache *regcache, windows_thread_info *th, int r)
static void | windows_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int r)
static void | do_windows_store_inferior_registers (const struct regcache *regcache, windows_thread_info *th, int r)
static void | windows_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int r)
static struct so_list * | windows_make_so (const char *name, LPVOID load_addr)
static char * | get_image_name (HANDLE h, void *address, int unicode)
static void | handle_load_dll ()
static void | windows_free_so (struct so_list *so)
static void | handle_unload_dll ()
static void | catch_errors (void(*func)())
static void | windows_clear_solib (void)
static void | signal_event_command (const char *args, int from_tty)
static int | handle_output_debug_string (struct target_waitstatus *ourstatus)
static int | display_selector (HANDLE thread, DWORD sel)
static void | display_selectors (const char *args, int from_tty)
static handle_exception_result | handle_exception (struct target_waitstatus *ourstatus)
static BOOL | windows_continue (DWORD continue_status, int id, int killed)
static DWORD | fake_create_process (void)
static void | windows_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal sig)
static BOOL WINAPI | ctrl_c_handler (DWORD event_type)
static int | get_windows_debug_event (struct target_ops *ops, int pid, struct target_waitstatus *ourstatus)
static ptid_t | windows_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int options)
static void | windows_add_all_dlls (void)
static void | do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching)
static int | set_process_privilege (const char *privilege, BOOL enable)
static void | windows_attach (struct target_ops *ops, const char *args, int from_tty)
static void | windows_detach (struct target_ops *ops, const char *args, int from_tty)
static int | windows_get_exec_module_filename (char *exe_name_ret, size_t exe_name_max_len)
static char * | windows_pid_to_exec_file (struct target_ops *self, int pid)
static void | windows_files_info (struct target_ops *ignore)
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 void | windows_create_inferior (struct target_ops *ops, const char *exec_file, const std::string &origallargs, char **in_env, int from_tty)
static void | windows_mourn_inferior (struct target_ops *ops)
static enum target_xfer_status | windows_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
static void | windows_close (struct target_ops *self)
static const char * | windows_pid_to_str (struct target_ops *ops, ptid_t ptid)
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_partial (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 int | windows_get_tib_address (struct target_ops *self, ptid_t ptid, CORE_ADDR *addr)
static ptid_t | windows_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
static const char * | windows_thread_name (struct target_ops *self, struct thread_info *thr)
static struct target_ops * | windows_target (void)
void | _initialize_windows_nat (void)
void | _initialize_check_for_gdb_ini (void)
static BOOL WINAPI | bad_DebugActiveProcessStop (DWORD w)
static BOOL WINAPI | bad_DebugBreakProcess (HANDLE w)
static BOOL WINAPI | bad_DebugSetProcessKillOnExit (BOOL w)
static BOOL WINAPI | bad_EnumProcessModules (HANDLE w, HMODULE *x, DWORD y, LPDWORD z)
static DWORD WINAPI | bad_GetModuleFileNameExA (HANDLE w, HMODULE x, LPSTR y, DWORD z)
static BOOL WINAPI | bad_GetModuleInformation (HANDLE w, HMODULE x, LPMODULEINFO y, DWORD z)
static BOOL WINAPI | bad_OpenProcessToken (HANDLE w, DWORD x, PHANDLE y)
static BOOL WINAPI | bad_GetCurrentConsoleFont (HANDLE w, BOOL bMaxWindow, CONSOLE_FONT_INFO *f)
static COORD WINAPI | bad_GetConsoleFontSize (HANDLE w, DWORD nFont)
void | _initialize_loadable (void)

## Variables
static AdjustTokenPrivileges_ftype * | AdjustTokenPrivileges
static DebugActiveProcessStop_ftype * | DebugActiveProcessStop
static DebugBreakProcess_ftype * | DebugBreakProcess
static DebugSetProcessKillOnExit_ftype * | DebugSetProcessKillOnExit
static EnumProcessModules_ftype * | EnumProcessModules
static GetModuleInformation_ftype * | GetModuleInformation
static LookupPrivilegeValueA_ftype * | LookupPrivilegeValueA
static OpenProcessToken_ftype * | OpenProcessToken
static GetCurrentConsoleFont_ftype * | GetCurrentConsoleFont
static GetConsoleFontSize_ftype * | GetConsoleFontSize
static GetModuleFileNameEx_ftype * | GetModuleFileNameEx
static int | have_saved_context
static CONTEXT | saved_context
static uintptr_t | dr [8]
static int | debug_registers_changed
static int | debug_registers_used
static int | windows_initialization_done
static enum gdb_signal | last_sig = GDB_SIGNAL_0
static windows_thread_info | thread_head
static DEBUG_EVENT | current_event
static HANDLE | current_process_handle
static windows_thread_info * | current_thread
static DWORD | main_thread_id
static int | exception_count = 0
static int | event_count = 0
static int | saw_create
static int | open_process_used = 0
static int | new_console = 0
static int | new_group = 1
static int | debug_exec = 0
static int | debug_events = 0
static int | debug_memory = 0
static int | debug_exceptions = 0
static int | useshell = 0
static const int * | mappings
static segment_register_p_ftype * | segment_register_p
static const struct xlate_exception | xlate []
static struct so_list solib_start * | solib_end

## Macro Definition Documentation

## ◆ __PMAX

#define __PMAX (MAX_PATH + 1)

Definition at line 124 of file windows-nat.c.

Referenced by get_image_name(), redir_set_redirection(), windows_add_all_dlls(), windows_create_inferior(), windows_make_so(), and windows_pid_to_exec_file().

## ◆ _CYGWIN_SIGNAL_STRING

#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f"

Definition at line 195 of file windows-nat.c.

Referenced by handle_output_debug_string().

## ◆ AdjustTokenPrivileges

#define AdjustTokenPrivileges dyn_AdjustTokenPrivileges

Definition at line 72 of file windows-nat.c.

Referenced by _initialize_loadable(), and set_process_privilege().

## ◆ bad_GetModuleFileNameEx

#define bad_GetModuleFileNameEx bad_GetModuleFileNameExA

Definition at line 130 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ CHECK

#define CHECK | ( |  | x | ) | check (x, __FILE__,__LINE__)

Definition at line 198 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers(), get_windows_debug_event(), windows_add_thread(), windows_continue(), windows_interrupt(), windows_kill_inferior(), windows_mourn_inferior(), and windows_resume().

## ◆ CONTEXT_DEBUGGER_DR

#define CONTEXT_DEBUGGER_DR

Value:
CONTEXT_FULL | CONTEXT_FLOATING_POINT \
| CONTEXT_SEGMENTS | CONTEXT_DEBUG_REGISTERS \
| CONTEXT_EXTENDED_REGISTERS
CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS
Definition: windows-nat.c:165

Definition at line 168 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers().

## ◆ CONTEXT_EXTENDED_REGISTERS

#define CONTEXT_EXTENDED_REGISTERS 0

Definition at line 165 of file windows-nat.c.

## ◆ CreateProcess

#define CreateProcess CreateProcessA

Definition at line 128 of file windows-nat.c.

Referenced by windows_create_inferior().

## ◆ DEBUG_EVENTS

#define DEBUG_EVENTS | ( |  | x | ) | if (debug_events) printf_unfiltered x

Definition at line 200 of file windows-nat.c.

Referenced by get_windows_debug_event(), handle_load_dll(), handle_unload_dll(), windows_close(), windows_continue(), windows_init_thread_list(), and windows_interrupt().

## ◆ DEBUG_EXCEPT

#define DEBUG_EXCEPT | ( |  | x | ) | if (debug_exceptions) printf_unfiltered x

Definition at line 202 of file windows-nat.c.

Referenced by windows_resume().

## ◆ DEBUG_EXCEPTION_SIMPLE

#define DEBUG_EXCEPTION_SIMPLE | ( |  | x | ) |

Value:
if (debug_exceptions) \
printf_unfiltered ("gdb: Target exception %s at %s\n", x, \
host_address_to_string (\
current_event.u.Exception.ExceptionRecord.ExceptionAddress))
host_address_to_string
#define host_address_to_string(ADDR)
Definition: print-utils.h:75
debug_exceptions
static int debug_exceptions
Definition: windows-nat.c:258
current_event
static DEBUG_EVENT current_event
Definition: windows-nat.c:237

Definition at line 1061 of file windows-nat.c.

Referenced by handle_exception().

## ◆ DEBUG_EXEC

#define DEBUG_EXEC | ( |  | x | ) | if (debug_exec) printf_unfiltered x

Definition at line 199 of file windows-nat.c.

Referenced by windows_resume().

## ◆ DEBUG_MEM

#define DEBUG_MEM | ( |  | x | ) | if (debug_memory) printf_unfiltered x

Definition at line 201 of file windows-nat.c.

Referenced by windows_xfer_memory().

## ◆ DebugActiveProcessStop

#define DebugActiveProcessStop dyn_DebugActiveProcessStop

Definition at line 73 of file windows-nat.c.

Referenced by _initialize_loadable(), and windows_detach().

## ◆ DebugBreakProcess

#define DebugBreakProcess dyn_DebugBreakProcess

Definition at line 74 of file windows-nat.c.

Referenced by _initialize_loadable(), and ctrl_c_handler().

## ◆ DebugSetProcessKillOnExit

#define DebugSetProcessKillOnExit dyn_DebugSetProcessKillOnExit

Definition at line 75 of file windows-nat.c.

Referenced by _initialize_loadable(), windows_attach(), and windows_detach().

## ◆ DR6_CLEAR_VALUE

#define DR6_CLEAR_VALUE 0xffff0ff0

Definition at line 177 of file windows-nat.c.

Referenced by windows_add_thread(), windows_continue(), and windows_resume().

## ◆ EnumProcessModules

#define EnumProcessModules dyn_EnumProcessModules

Definition at line 76 of file windows-nat.c.

Referenced by _initialize_loadable(), windows_add_all_dlls(), and windows_get_exec_module_filename().

## ◆ GetConsoleFontSize

#define GetConsoleFontSize dyn_GetConsoleFontSize

Definition at line 80 of file windows-nat.c.

Referenced by _initialize_loadable(), and windows_set_console_info().

## ◆ GetCurrentConsoleFont

#define GetCurrentConsoleFont dyn_GetCurrentConsoleFont

Definition at line 81 of file windows-nat.c.

Referenced by _initialize_loadable(), and windows_set_console_info().

## ◆ GetModuleFileNameEx_name

#define GetModuleFileNameEx_name "GetModuleFileNameExA"

Definition at line 129 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ GetModuleInformation

#define GetModuleInformation dyn_GetModuleInformation

Definition at line 77 of file windows-nat.c.

Referenced by _initialize_loadable(), and windows_add_all_dlls().

## ◆ GPA

#define GPA | ( |  | m,
|  |  | func
| ) |  | func = (func ## _ftype *) GetProcAddress (m, #func)

Referenced by _initialize_loadable().

## ◆ LookupPrivilegeValueA

#define LookupPrivilegeValueA dyn_LookupPrivilegeValueA

Definition at line 78 of file windows-nat.c.

Referenced by _initialize_loadable(), and set_process_privilege().

## ◆ MS_VC_EXCEPTION

#define MS_VC_EXCEPTION 0x406d1388

Definition at line 183 of file windows-nat.c.

Referenced by handle_exception().

## ◆ OpenProcessToken

#define OpenProcessToken dyn_OpenProcessToken

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

Referenced by _initialize_loadable(), and set_process_privilege().

## ◆ STARTUPINFO

#define STARTUPINFO STARTUPINFOA

Definition at line 127 of file windows-nat.c.

Referenced by windows_create_inferior().

## Typedef Documentation

## ◆ AdjustTokenPrivileges_ftype

typedef BOOL WINAPI() AdjustTokenPrivileges_ftype(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD)

Definition at line 83 of file windows-nat.c.

## ◆ DebugActiveProcessStop_ftype

typedef BOOL WINAPI() DebugActiveProcessStop_ftype(DWORD)

Definition at line 89 of file windows-nat.c.

## ◆ DebugBreakProcess_ftype

typedef BOOL WINAPI() DebugBreakProcess_ftype(HANDLE)

Definition at line 92 of file windows-nat.c.

## ◆ DebugSetProcessKillOnExit_ftype

typedef BOOL WINAPI() DebugSetProcessKillOnExit_ftype(BOOL)

Definition at line 95 of file windows-nat.c.

## ◆ EnumProcessModules_ftype

typedef BOOL WINAPI() EnumProcessModules_ftype(HANDLE, HMODULE *, DWORD, LPDWORD)

Definition at line 98 of file windows-nat.c.

## ◆ GetConsoleFontSize_ftype

typedef COORD WINAPI() GetConsoleFontSize_ftype(HANDLE, DWORD)

Definition at line 116 of file windows-nat.c.

## ◆ GetCurrentConsoleFont_ftype

typedef BOOL WINAPI() GetCurrentConsoleFont_ftype(HANDLE, BOOL, CONSOLE_FONT_INFO *)

Definition at line 112 of file windows-nat.c.

## ◆ GetModuleFileNameEx_ftype

typedef DWORD WINAPI() GetModuleFileNameEx_ftype(HANDLE, HMODULE, LPSTR, DWORD)

Definition at line 125 of file windows-nat.c.

## ◆ GetModuleInformation_ftype

typedef BOOL WINAPI() GetModuleInformation_ftype(HANDLE, HMODULE, LPMODULEINFO, DWORD)

Definition at line 102 of file windows-nat.c.

## ◆ LookupPrivilegeValueA_ftype

typedef BOOL WINAPI() LookupPrivilegeValueA_ftype(LPCSTR, LPCSTR, PLUID)

Definition at line 106 of file windows-nat.c.

## ◆ OpenProcessToken_ftype

typedef BOOL WINAPI() OpenProcessToken_ftype(HANDLE, DWORD, PHANDLE)

Definition at line 109 of file windows-nat.c.

## ◆ windows_thread_info

typedef struct windows_thread_info_struct windows_thread_info

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
FLAG_TRACE_BIT |

Definition at line 156 of file windows-nat.c.

## ◆ handle_exception_result

enum handle_exception_result

Enumerator
HANDLE_EXCEPTION_UNHANDLED |
HANDLE_EXCEPTION_HANDLED |
HANDLE_EXCEPTION_IGNORED |

Definition at line 185 of file windows-nat.c.

## Function Documentation

## ◆ _initialize_check_for_gdb_ini()

void _initialize_check_for_gdb_ini | ( | void |  | ) |

Definition at line 3164 of file windows-nat.c.

References _, inhibit_gdbinit, warning(), and xsnprintf().

## ◆ _initialize_loadable()

void _initialize_loadable | ( | void |  | ) |

Definition at line 3261 of file windows-nat.c.

References _, AdjustTokenPrivileges, bad_DebugActiveProcessStop(), bad_DebugBreakProcess(), bad_DebugSetProcessKillOnExit(), bad_EnumProcessModules(), bad_GetConsoleFontSize(), bad_GetCurrentConsoleFont(), bad_GetModuleFileNameEx, bad_GetModuleInformation(), bad_OpenProcessToken(), DebugActiveProcessStop, DebugBreakProcess, DebugSetProcessKillOnExit, EnumProcessModules, GetConsoleFontSize, GetCurrentConsoleFont, GetModuleFileNameEx, GetModuleFileNameEx_name, GetModuleInformation, GPA, LookupPrivilegeValueA, OpenProcessToken, and warning().

## ◆ _initialize_windows_nat()

void _initialize_windows_nat | ( | void |  | ) |

Definition at line 2996 of file windows-nat.c.

References _, add_cmd(), add_com(), add_setshow_boolean_cmd(), add_target(), 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(), new_console, new_group, x86_dr_low_type::set_addr, x86_dr_low_type::set_control, setlist, showlist, signal_event_command(), useshell, windows_target(), x86_dr_low, and x86_use_watchpoints().

## ◆ bad_DebugActiveProcessStop()

static BOOL WINAPI bad_DebugActiveProcessStop | ( | DWORD | w | ) |
| static

Definition at line 3196 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_DebugBreakProcess()

static BOOL WINAPI bad_DebugBreakProcess | ( | HANDLE | w | ) |
| static

Definition at line 3201 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_DebugSetProcessKillOnExit()

static BOOL WINAPI bad_DebugSetProcessKillOnExit | ( | BOOL | w | ) |
| static

Definition at line 3206 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_EnumProcessModules()

static BOOL WINAPI bad_EnumProcessModules | ( | HANDLE | w,
|  | HMODULE * | x,
|  | DWORD | y,
|  | LPDWORD | z
| ) |  |
| static

Definition at line 3211 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_GetConsoleFontSize()

static COORD WINAPI bad_GetConsoleFontSize | ( | HANDLE | w,
|  | DWORD | nFont
| ) |  |
| static

Definition at line 3249 of file windows-nat.c.

References size.

Referenced by _initialize_loadable().

## ◆ bad_GetCurrentConsoleFont()

static BOOL WINAPI bad_GetCurrentConsoleFont | ( | HANDLE | w,
|  | BOOL | bMaxWindow,
|  | CONSOLE_FONT_INFO * | f
| ) |  |
| static

Definition at line 3243 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_GetModuleFileNameExA()

static DWORD WINAPI bad_GetModuleFileNameExA | ( | HANDLE | w,
|  | HMODULE | x,
|  | LPSTR | y,
|  | DWORD | z
| ) |  |
| static

Definition at line 3224 of file windows-nat.c.

## ◆ bad_GetModuleInformation()

static BOOL WINAPI bad_GetModuleInformation | ( | HANDLE | w,
|  | HMODULE | x,
|  | LPMODULEINFO | y,
|  | DWORD | z
| ) |  |
| static

Definition at line 3231 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ bad_OpenProcessToken()

static BOOL WINAPI bad_OpenProcessToken | ( | HANDLE | w,
|  | DWORD | x,
|  | PHANDLE | y
| ) |  |
| static

Definition at line 3237 of file windows-nat.c.

Referenced by _initialize_loadable().

## ◆ catch_errors()

static void catch_errors | ( | void(*)() | func | ) |
| static

Definition at line 840 of file windows-nat.c.

References CATCH, END_CATCH, exception_print(), func, gdb_stderr, RETURN_MASK_ALL, and TRY.

Referenced by get_windows_debug_event().

## ◆ check()

static void check | ( | BOOL | ok,
|  | const char * | file,
|  | int | line
| ) |  |
| static

Definition at line 323 of file windows-nat.c.

References printf_filtered().

Referenced by build_id_verify(), gdbscm_value_to_real(), i386_skip_noop(), i387_collect_xsave(), and load_progress().

## ◆ ctrl_c_handler()

static BOOL WINAPI ctrl_c_handler | ( | DWORD | event_type | ) |
| static

Definition at line 1415 of file windows-nat.c.

References _, inferior::attach_flag, current_inferior(), current_process_handle, DebugBreakProcess, new_console, and warning().

Referenced by windows_wait().

## ◆ cygwin_get_dr()

static CORE_ADDR cygwin_get_dr | ( | int | i | ) |
| static

Definition at line 3124 of file windows-nat.c.

References dr.

Referenced by _initialize_windows_nat().

## ◆ cygwin_get_dr6()

static unsigned long cygwin_get_dr6 | ( | void |  | ) |
| static

Definition at line 3133 of file windows-nat.c.

References dr.

Referenced by _initialize_windows_nat().

## ◆ cygwin_get_dr7()

static unsigned long cygwin_get_dr7 | ( | void |  | ) |
| static

Definition at line 3143 of file windows-nat.c.

References dr.

Referenced by _initialize_windows_nat().

## ◆ cygwin_set_dr()

static void cygwin_set_dr | ( | int | i,
|  | CORE_ADDR | addr
| ) |  |
| static

Definition at line 3100 of file windows-nat.c.

References _, debug_registers_changed, debug_registers_used, dr, and internal_error().

Referenced by _initialize_windows_nat().

## ◆ cygwin_set_dr7()

static void cygwin_set_dr7 | ( | unsigned long | val | ) |
| static

Definition at line 3114 of file windows-nat.c.

References debug_registers_changed, debug_registers_used, and dr.

Referenced by _initialize_windows_nat().

## ◆ display_selector()

static int display_selector | ( | HANDLE | thread,
|  | DWORD | sel
| ) |  |
| static

Definition at line 947 of file windows-nat.c.

References err, if(), printf_filtered(), and puts_filtered().

Referenced by display_selectors().

## ◆ display_selectors()

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

Definition at line 1023 of file windows-nat.c.

References windows_thread_info_struct::context, current_thread, display_selector(), windows_thread_info_struct::h, parse_and_eval_long(), printf_filtered(), and puts_filtered().

Referenced by _initialize_windows_nat().

## ◆ do_initial_windows_stuff()

static void do_initial_windows_stuff | ( | struct target_ops * | ops,
|  | DWORD | pid,
|  | int | attaching
| ) |  |
| static

Definition at line 1753 of file windows-nat.c.

References clear_proceed_status(), current_event, current_inferior(), debug_registers_changed, debug_registers_used, disable_breakpoints_in_shlibs(), dr, event_count, exception_count, arm-linux::inf, target_terminal::inferior(), inferior_appeared(), inferior_ptid, target_terminal::init(), init_wait_for_inferior(), last_sig, memset(), minus_one_ptid, open_process_used, pid, pid_to_ptid(), push_target(), status, target_is_pushed(), TARGET_WAITKIND_LOADED, TARGET_WAITKIND_SPURIOUS, windows_add_all_dlls(), windows_clear_solib(), windows_initialization_done, windows_resume(), and windows_wait().

Referenced by windows_attach(), and windows_create_inferior().

## ◆ do_windows_fetch_inferior_registers()

static void do_windows_fetch_inferior_registers | ( | struct regcache * | regcache,
|  | windows_thread_info * | th,
|  | int | r
| ) |  |
| static

Definition at line 465 of file windows-nat.c.

References regcache::arch(), CHECK, windows_thread_info_struct::context, CONTEXT_DEBUGGER_DR, context_offset, debug_registers_changed, dr, gdbarch_num_regs(), gdbarch_tdep(), windows_thread_info_struct::h, have_saved_context, I387_FISEG_REGNUM, I387_FOP_REGNUM, mappings, regcache_raw_supply(), windows_thread_info_struct::reload_context, saved_context, and segment_register_p.

Referenced by windows_fetch_inferior_registers().

## ◆ do_windows_store_inferior_registers()

static void do_windows_store_inferior_registers | ( | const struct regcache * | regcache,
|  | windows_thread_info * | th,
|  | int | r
| ) |  |
| static

Definition at line 548 of file windows-nat.c.

References regcache::arch(), windows_thread_info_struct::context, gdbarch_num_regs(), mappings, and regcache_raw_collect().

Referenced by windows_store_inferior_registers().

## ◆ envvar_cmp()

static int envvar_cmp | ( | const void * | a,
|  | const void * | b
| ) |  |
| static

Definition at line 2107 of file windows-nat.c.

Referenced by windows_create_inferior().

## ◆ fake_create_process()

static DWORD fake_create_process | ( | void |  | ) |
| static

Definition at line 1296 of file windows-nat.c.

References _, current_event, current_process_handle, current_thread, error(), main_thread_id, open_process_used, ptid_build(), and windows_add_thread().

Referenced by get_windows_debug_event().

## ◆ get_image_name()

static char* get_image_name | ( | HANDLE | h,
|  | void * | address,
|  | int | unicode
| ) |  |
| static

Definition at line 703 of file windows-nat.c.

References __PMAX, and size.

Referenced by handle_load_dll().

## ◆ get_windows_debug_event()

static int get_windows_debug_event | ( | struct target_ops * | ops,
|  | int | pid,
|  | struct target_waitstatus * | ourstatus
| ) |  |
| static

Definition at line 1439 of file windows-nat.c.

References _, BOOL, catch_errors(), CHECK, current_event, current_process_handle, current_thread, DEBUG_EVENTS, error(), event_count, fake_create_process(), find_inferior_pid(), handle_exception(), HANDLE_EXCEPTION_HANDLED, HANDLE_EXCEPTION_IGNORED, HANDLE_EXCEPTION_UNHANDLED, handle_load_dll(), handle_output_debug_string(), handle_unload_dll(), have_saved_context, arm-linux::inf, inferior_ptid, target_waitstatus::integer, target_waitstatus::kind, last_sig, main_thread_id, target_terminal::ours(), printf_unfiltered(), ptid_build(), saw_create, target_mourn_inferior(), TARGET_WAITKIND_EXITED, TARGET_WAITKIND_LOADED, TARGET_WAITKIND_SPURIOUS, thread_rec(), target_waitstatus::value, windows_add_thread(), windows_continue(), windows_delete_thread(), and windows_initialization_done.

Referenced by windows_wait().

## ◆ handle_exception()

static handle_exception_result handle_exception | ( | struct target_waitstatus * | ourstatus | ) |
| static

Definition at line 1067 of file windows-nat.c.

References code, current_event, DEBUG_EXCEPTION_SIMPLE, exception_count, find_pc_partial_function(), HANDLE_EXCEPTION_HANDLED, HANDLE_EXCEPTION_IGNORED, HANDLE_EXCEPTION_UNHANDLED, host_address_to_string, target_waitstatus::kind, last_sig, MS_VC_EXCEPTION, windows_thread_info_struct::name, printf_unfiltered(), target_waitstatus::sig, startswith(), target_read_string(), TARGET_WAITKIND_STOPPED, thread_rec(), target_waitstatus::value, and xfree().

Referenced by get_windows_debug_event().

## ◆ handle_load_dll()

static void handle_load_dll | ( |  | ) |
| static

Definition at line 760 of file windows-nat.c.

References current_event, current_process_handle, DEBUG_EVENTS, get_image_name(), host_address_to_string, so_list::lm_info, lm_info_windows::load_addr, so_list::next, so_list::so_name, solib_end, and windows_make_so().

Referenced by get_windows_debug_event().

## ◆ handle_output_debug_string()

static int handle_output_debug_string | ( | struct target_waitstatus * | ourstatus | ) |
| static

Definition at line 884 of file windows-nat.c.

References _CYGWIN_SIGNAL_STRING, current_event, current_process_handle, gdb_signal_from_host(), have_saved_context, target_waitstatus::kind, main_thread_id, saved_context, target_waitstatus::sig, startswith(), target_read_string(), TARGET_WAITKIND_STOPPED, target_waitstatus::value, warning(), and xfree().

Referenced by get_windows_debug_event().

## ◆ handle_unload_dll()

static void handle_unload_dll | ( |  | ) |
| static

Definition at line 802 of file windows-nat.c.

References _, complaint, current_event, DEBUG_EVENTS, host_address_to_string, if(), so_list::lm_info, lm_info_windows::load_addr, so_list::next, so_list::so_name, solib_end, symfile_complaints, and windows_free_so().

Referenced by get_windows_debug_event().

## ◆ redir_open()

static int redir_open | ( | const char * | redir_string,
|  | int * | inp,
|  | int * | out,
|  | int * | err
| ) |  |
| static

Definition at line 2215 of file windows-nat.c.

References err, and L.

Referenced by redir_set_redirection().

## ◆ redir_set_redirection()

static int redir_set_redirection | ( | const char * | s,
|  | int * | inp,
|  | int * | out,
|  | int * | err
| ) |  |
| static

Definition at line 2309 of file windows-nat.c.

References __PMAX, err, and redir_open().

Referenced by redirect_inferior_handles().

## ◆ redirect_inferior_handles()

static bool redirect_inferior_handles | ( | const char * | cmd_orig,
|  | char * | cmd,
|  | int * | inp,
|  | int * | out,
|  | int * | err
| ) |  |
| static

Definition at line 2384 of file windows-nat.c.

References err, and redir_set_redirection().

Referenced by windows_create_inferior().

## ◆ set_process_privilege()

static int set_process_privilege | ( | const char * | privilege,
|  | BOOL | enable
| ) |  |
| static

Definition at line 1837 of file windows-nat.c.

References AdjustTokenPrivileges, enable, LookupPrivilegeValueA, OpenProcessToken, and size.

Referenced by windows_attach().

## ◆ signal_event_command()

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

Definition at line 862 of file windows-nat.c.

References _, and error().

Referenced by _initialize_windows_nat().

## ◆ thread_rec()

static windows_thread_info* thread_rec | ( | DWORD | id,
|  | int | get_context
| ) |  |
| static

Definition at line 334 of file windows-nat.c.

References _, current_event, err, windows_thread_info_struct::h, windows_thread_info_struct::id, windows_thread_info_struct::next, windows_thread_info_struct::reload_context, windows_thread_info_struct::suspended, thread_head, and warning().

Referenced by get_windows_debug_event(), handle_exception(), windows_add_thread(), windows_fetch_inferior_registers(), windows_get_tib_address(), windows_resume(), windows_store_inferior_registers(), windows_thread_alive(), and windows_thread_name().

## ◆ windows_add_all_dlls()

static void windows_add_all_dlls | ( | void |  | ) |
| static

Definition at line 1705 of file windows-nat.c.

References __PMAX, current_process_handle, EnumProcessModules, GetModuleFileNameEx, GetModuleInformation, name, so_list::next, solib_end, and windows_make_so().

Referenced by do_initial_windows_stuff().

## ◆ windows_add_thread()

static windows_thread_info* windows_add_thread | ( | ptid_t | ptid,
|  | HANDLE | h,
|  | void * | tlb
| ) |  |
| static

Definition at line 377 of file windows-nat.c.

References add_thread(), CHECK, windows_thread_info_struct::context, debug_registers_used, dr, DR6_CLEAR_VALUE, gdb_assert, windows_thread_info_struct::h, windows_thread_info_struct::id, windows_thread_info_struct::next, ptid_get_tid(), thread_head, windows_thread_info_struct::thread_local_base, thread_rec(), and XCNEW.

Referenced by fake_create_process(), and get_windows_debug_event().

## ◆ windows_attach()

static void windows_attach | ( | struct target_ops * | ops,
|  | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 1881 of file windows-nat.c.

References _, BOOL, DebugSetProcessKillOnExit, do_initial_windows_stuff(), error(), gdb_flush(), gdb_stdout, get_exec_file(), target_terminal::ours(), parse_pid_to_attach(), pid, pid_to_ptid(), printf_unfiltered(), saw_create, set_process_privilege(), target_pid_to_str(), and windows_init_thread_list().

Referenced by windows_target().

## ◆ windows_clear_solib()

static void windows_clear_solib | ( | void |  | ) |
| static

Definition at line 855 of file windows-nat.c.

References solib_end.

Referenced by do_initial_windows_stuff().

## ◆ windows_close()

static void windows_close | ( | struct target_ops * | self | ) |
| static

Definition at line 2846 of file windows-nat.c.

References DEBUG_EVENTS, inferior_ptid, and ptid_get_pid().

Referenced by windows_target().

## ◆ windows_continue()

static BOOL windows_continue | ( | DWORD | continue_status,
|  | int | id,
|  | int | killed
| ) |  |
| static

Definition at line 1235 of file windows-nat.c.

References _, BOOL, CHECK, windows_thread_info_struct::context, current_event, DEBUG_EVENTS, debug_registers_changed, dr, DR6_CLEAR_VALUE, error(), windows_thread_info_struct::h, windows_thread_info_struct::id, windows_thread_info_struct::next, status, windows_thread_info_struct::suspended, and thread_head.

Referenced by get_windows_debug_event(), windows_kill_inferior(), windows_mourn_inferior(), and windows_resume().

## ◆ windows_create_inferior()

static void windows_create_inferior | ( | struct target_ops * | ops,
|  | const char * | exec_file,
|  | const std::string & | origallargs,
|  | char ** | in_env,
|  | int | from_tty
| ) |  |
| static

Definition at line 2438 of file windows-nat.c.

References _, __PMAX, inferior::args, BOOL, CreateProcess, do_initial_windows_stuff(), environ, envvar_cmp(), error(), flags, free(), gdb_tilde_expand(), get_inferior_cwd(), get_inferior_io_terminal(), L, memset(), new_console, new_group, O_NOCTTY, print_sys_errmsg(), qsort, redirect_inferior_handles(), saw_create, STARTUPINFO, string, useshell, warning(), windows_init_thread_list(), windows_set_console_info(), and xsnprintf().

Referenced by windows_target().

## ◆ windows_delete_thread()

static void windows_delete_thread | ( | ptid_t | ptid,
|  | DWORD | exit_code
| ) |  |
| static

Definition at line 434 of file windows-nat.c.

References _, delete_thread(), gdb_assert, windows_thread_info_struct::id, info_verbose, main_thread_id, windows_thread_info_struct::name, windows_thread_info_struct::next, print_thread_events, printf_unfiltered(), ptid_get_tid(), target_pid_to_str(), thread_head, and xfree().

Referenced by get_windows_debug_event().

## ◆ windows_detach()

static void windows_detach | ( | struct target_ops * | ops,
|  | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 1934 of file windows-nat.c.

References _, current_event, DebugActiveProcessStop, DebugSetProcessKillOnExit, detach_inferior(), error(), gdb_flush(), gdb_stdout, get_exec_file(), inf_child_maybe_unpush_target(), inferior_ptid, minus_one_ptid, null_ptid, printf_unfiltered(), windows_resume(), and x86_cleanup_dregs().

Referenced by windows_target().

## ◆ windows_fetch_inferior_registers()

static void windows_fetch_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | r
| ) |  |
| static

Definition at line 535 of file windows-nat.c.

References do_windows_fetch_inferior_registers(), pid, ptid_get_tid(), regcache_get_ptid(), and thread_rec().

Referenced by windows_resume(), and windows_target().

## ◆ windows_files_info()

static void windows_files_info | ( | struct target_ops * | ignore | ) |
| static

Definition at line 2049 of file windows-nat.c.

References current_inferior(), inferior_ptid, printf_unfiltered(), and target_pid_to_str().

Referenced by windows_target().

## ◆ windows_free_so()

static void windows_free_so | ( | struct so_list * | so | ) |
| static

Definition at line 785 of file windows-nat.c.

References so_list::lm_info, and xfree().

Referenced by handle_unload_dll().

## ◆ windows_get_ada_task_ptid()

static ptid_t windows_get_ada_task_ptid | ( | struct target_ops * | self,
|  | long | lwp,
|  | long | thread
| ) |  |
| static

Definition at line 2953 of file windows-nat.c.

References inferior_ptid, selftests::ptid::lwp, ptid_build(), and ptid_get_pid().

Referenced by windows_target().

## ◆ windows_get_exec_module_filename()

static int windows_get_exec_module_filename | ( | char * | exe_name_ret,
|  | size_t | exe_name_max_len
| ) |  |
| static

Definition at line 1977 of file windows-nat.c.

References _, current_process_handle, EnumProcessModules, error(), and GetModuleFileNameEx.

Referenced by windows_pid_to_exec_file().

## ◆ windows_get_tib_address()

static int windows_get_tib_address | ( | struct target_ops * | self,
|  | ptid_t | ptid,
|  | CORE_ADDR * | addr
| ) |  |
| static

Definition at line 2937 of file windows-nat.c.

References ptid_get_tid(), windows_thread_info_struct::thread_local_base, and thread_rec().

Referenced by windows_target().

## ◆ windows_init_thread_list()

static void windows_init_thread_list | ( | void |  | ) |
| static

Definition at line 417 of file windows-nat.c.

References DEBUG_EVENTS, init_thread_list(), windows_thread_info_struct::next, thread_head, and xfree().

Referenced by windows_attach(), and windows_create_inferior().

## ◆ windows_interrupt()

static void windows_interrupt | ( | struct target_ops * | self,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 2780 of file windows-nat.c.

References CHECK, current_event, DEBUG_EVENTS, and registers_changed().

Referenced by windows_target().

## ◆ windows_kill_inferior()

static void windows_kill_inferior | ( | struct target_ops * | ops | ) |
| static

Definition at line 2828 of file windows-nat.c.

References CHECK, current_event, current_process_handle, inferior_ptid, target_mourn_inferior(), and windows_continue().

Referenced by windows_target(), and windows_wait().

## ◆ windows_make_so()

static struct so_list* windows_make_so | ( | const char * | name,
|  | LPVOID | load_addr
| ) |  |
| static

Definition at line 598 of file windows-nat.c.

References _, __PMAX, so_list::abfd, error(), free(), gdb_bfd_open(), L, so_list::lm_info, lm_info_windows::load_addr, name, so_list::so_name, SO_NAME_MAX_PATH_SIZE, so_list::so_original_name, and XCNEW.

Referenced by handle_load_dll(), and windows_add_all_dlls().

## ◆ windows_mourn_inferior()

static void windows_mourn_inferior | ( | struct target_ops * | ops | ) |
| static

Definition at line 2764 of file windows-nat.c.

References CHECK, current_process_handle, inf_child_mourn_inferior(), open_process_used, windows_continue(), and x86_cleanup_dregs().

Referenced by windows_target().

## ◆ windows_pid_to_exec_file()

static char* windows_pid_to_exec_file | ( | struct target_ops * | self,
|  | int | pid
| ) |  |
| static

Definition at line 2021 of file windows-nat.c.

References __PMAX, pid, windows_get_exec_module_filename(), and xsnprintf().

Referenced by windows_target().

## ◆ windows_pid_to_str()

static const char* windows_pid_to_str | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 2854 of file windows-nat.c.

References normal_pid_to_str(), ptid_get_pid(), and ptid_get_tid().

Referenced by windows_target().

## ◆ windows_resume()

static void windows_resume | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | int | step,
|  | enum gdb_signal | sig
| ) |  |
| static

Definition at line 1318 of file windows-nat.c.

References regcache::arch(), CHECK, windows_thread_info_struct::context, current_event, DEBUG_EXCEPT, DEBUG_EXEC, debug_registers_changed, dr, DR6_CLEAR_VALUE, FLAG_TRACE_BIT, gdbarch_ps_regnum(), get_current_regcache(), windows_thread_info_struct::h, inferior_ptid, last_sig, minus_one_ptid, ptid_equal(), ptid_get_pid(), ptid_get_tid(), xlate_exception::them, thread_rec(), windows_continue(), windows_fetch_inferior_registers(), and xlate.

Referenced by do_initial_windows_stuff(), windows_detach(), and windows_target().

## ◆ windows_set_console_info()

static void windows_set_console_info | ( | STARTUPINFO * | si,
|  | DWORD * | flags
| ) |  |
| static

Definition at line 2072 of file windows-nat.c.

References flags, GetConsoleFontSize, and GetCurrentConsoleFont.

Referenced by windows_create_inferior().

## ◆ windows_set_context_register_offsets()

void windows_set_context_register_offsets | ( | const int * | offsets | ) |

Definition at line 309 of file windows-nat.c.

References mappings.

Referenced by _initialize_amd64_windows_nat(), and _initialize_i386_windows_nat().

## ◆ windows_set_segment_register_p()

void windows_set_segment_register_p | ( | segment_register_p_ftype * | fun | ) |

Definition at line 317 of file windows-nat.c.

References segment_register_p.

Referenced by _initialize_amd64_windows_nat(), and _initialize_i386_windows_nat().

## ◆ windows_store_inferior_registers()

static void windows_store_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | r
| ) |  |
| static

Definition at line 564 of file windows-nat.c.

References do_windows_store_inferior_registers(), pid, ptid_get_tid(), regcache_get_ptid(), and thread_rec().

Referenced by windows_target().

## ◆ windows_target()

static struct target_ops* windows_target | ( | void |  | ) |
| static

Definition at line 2967 of file windows-nat.c.

References inf_child_target(), target_ops::to_attach, target_ops::to_attach_no_wait, target_ops::to_close, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_get_ada_task_ptid, target_ops::to_get_tib_address, target_ops::to_interrupt, target_ops::to_kill, target_ops::to_mourn_inferior, target_ops::to_pid_to_exec_file, target_ops::to_pid_to_str, target_ops::to_resume, target_ops::to_store_registers, target_ops::to_thread_alive, target_ops::to_thread_name, target_ops::to_wait, target_ops::to_xfer_partial, windows_attach(), windows_close(), windows_create_inferior(), windows_detach(), windows_fetch_inferior_registers(), windows_files_info(), windows_get_ada_task_ptid(), windows_get_tib_address(), windows_interrupt(), windows_kill_inferior(), windows_mourn_inferior(), windows_pid_to_exec_file(), windows_pid_to_str(), windows_resume(), windows_store_inferior_registers(), windows_thread_alive(), windows_thread_name(), windows_wait(), and windows_xfer_partial().

Referenced by _initialize_windows_nat().

## ◆ windows_thread_alive()

static int windows_thread_alive | ( | struct target_ops * | ops,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 3152 of file windows-nat.c.

References gdb_assert, ptid_get_tid(), thread_rec(), and selftests::ptid::tid.

Referenced by windows_target().

## ◆ windows_thread_name()

static const char* windows_thread_name | ( | struct target_ops * | self,
|  | struct thread_info * | thr
| ) |  |
| static

Definition at line 2961 of file windows-nat.c.

References windows_thread_info_struct::name, thread_info::ptid, ptid_get_tid(), and thread_rec().

Referenced by windows_target().

## ◆ windows_wait()

static ptid_t windows_wait | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | struct target_waitstatus * | ourstatus,
|  | int | options
| ) |  |
| static

Definition at line 1639 of file windows-nat.c.

References ctrl_c_handler(), current_event, deprecated_ui_loop_hook, get_windows_debug_event(), target_terminal::ours(), pid, ptid_build(), and windows_kill_inferior().

Referenced by do_initial_windows_stuff(), and windows_target().

## ◆ windows_xfer_memory()

static enum target_xfer_status windows_xfer_memory | ( | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | memaddr,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 2791 of file windows-nat.c.

References BOOL, core_addr_to_string(), current_process_handle, DEBUG_MEM, pulongest(), TARGET_XFER_E_IO, and TARGET_XFER_OK.

Referenced by windows_xfer_partial().

## ◆ windows_xfer_partial()

static enum target_xfer_status windows_xfer_partial | ( | 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

Definition at line 2912 of file windows-nat.c.

References target_ops::beneath, offset, TARGET_OBJECT_LIBRARIES, TARGET_OBJECT_MEMORY, target_ops::to_xfer_partial, windows_xfer_memory(), and windows_xfer_shared_libraries().

Referenced by windows_target().

## ◆ windows_xfer_shared_libraries()

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

Definition at line 2869 of file windows-nat.c.

References so_list::lm_info, lm_info_windows::load_addr, so_list::next, obstack_grow_str, obstack_grow_str0, offset, so_list::so_name, target_gdbarch(), TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, and windows_xfer_shared_library().

Referenced by windows_xfer_partial().

## Variable Documentation

## ◆ AdjustTokenPrivileges

AdjustTokenPrivileges_ftype* AdjustTokenPrivileges
| static

Definition at line 87 of file windows-nat.c.

## ◆ current_event

DEBUG_EVENT current_event
| static

Definition at line 237 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), fake_create_process(), get_windows_debug_event(), handle_exception(), handle_load_dll(), handle_output_debug_string(), handle_unload_dll(), thread_rec(), windows_continue(), windows_detach(), windows_interrupt(), windows_kill_inferior(), windows_resume(), and windows_wait().

## ◆ current_process_handle

HANDLE current_process_handle
| static

Definition at line 239 of file windows-nat.c.

Referenced by ctrl_c_handler(), fake_create_process(), get_windows_debug_event(), handle_load_dll(), handle_output_debug_string(), windows_add_all_dlls(), windows_get_exec_module_filename(), windows_kill_inferior(), windows_mourn_inferior(), and windows_xfer_memory().

## ◆ current_thread

windows_thread_info* current_thread
| static

Definition at line 240 of file windows-nat.c.

Referenced by display_selectors(), fake_create_process(), get_windows_debug_event(), i386_darwin_dr_get(), i386_darwin_dr_set(), i386_darwin_fetch_inferior_registers(), i386_darwin_store_inferior_registers(), and mi_cmd_thread_list_ids().

## ◆ debug_events

int debug_events = 0
| static

Definition at line 256 of file windows-nat.c.

Referenced by _initialize_windows_nat().

## ◆ debug_exceptions

int debug_exceptions = 0
| static

Definition at line 258 of file windows-nat.c.

Referenced by _initialize_windows_nat().

## ◆ debug_exec

int debug_exec = 0
| static

Definition at line 255 of file windows-nat.c.

Referenced by _initialize_windows_nat().

## ◆ debug_memory

int debug_memory = 0
| static

Definition at line 257 of file windows-nat.c.

Referenced by _initialize_windows_nat().

## ◆ debug_registers_changed

int debug_registers_changed
| static

Definition at line 173 of file windows-nat.c.

Referenced by cygwin_set_dr(), cygwin_set_dr7(), do_initial_windows_stuff(), do_windows_fetch_inferior_registers(), windows_continue(), and windows_resume().

## ◆ debug_registers_used

int debug_registers_used
| static

Definition at line 174 of file windows-nat.c.

Referenced by cygwin_set_dr(), cygwin_set_dr7(), do_initial_windows_stuff(), and windows_add_thread().

## ◆ DebugActiveProcessStop

DebugActiveProcessStop_ftype* DebugActiveProcessStop
| static

Definition at line 90 of file windows-nat.c.

## ◆ DebugBreakProcess

DebugBreakProcess_ftype* DebugBreakProcess
| static

Definition at line 93 of file windows-nat.c.

## ◆ DebugSetProcessKillOnExit

DebugSetProcessKillOnExit_ftype* DebugSetProcessKillOnExit
| static

Definition at line 96 of file windows-nat.c.

## ◆ dr

uintptr_t dr[8]
| static

Definition at line 172 of file windows-nat.c.

Referenced by cygwin_get_dr(), cygwin_get_dr6(), cygwin_get_dr7(), cygwin_set_dr(), cygwin_set_dr7(), do_initial_windows_stuff(), do_windows_fetch_inferior_registers(), windows_add_thread(), windows_continue(), and windows_resume().

## ◆ EnumProcessModules

EnumProcessModules_ftype* EnumProcessModules
| static

Definition at line 100 of file windows-nat.c.

## ◆ event_count

int event_count = 0
| static

Definition at line 245 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), and get_windows_debug_event().

## ◆ exception_count

int exception_count = 0
| static

Definition at line 244 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), and handle_exception().

## ◆ GetConsoleFontSize

GetConsoleFontSize_ftype* GetConsoleFontSize
| static

Definition at line 117 of file windows-nat.c.

## ◆ GetCurrentConsoleFont

GetCurrentConsoleFont_ftype* GetCurrentConsoleFont
| static

Definition at line 114 of file windows-nat.c.

## ◆ GetModuleFileNameEx

GetModuleFileNameEx_ftype* GetModuleFileNameEx
| static

Definition at line 126 of file windows-nat.c.

Referenced by _initialize_loadable(), windows_add_all_dlls(), and windows_get_exec_module_filename().

## ◆ GetModuleInformation

GetModuleInformation_ftype* GetModuleInformation
| static

Definition at line 104 of file windows-nat.c.

## ◆ have_saved_context

int have_saved_context
| static

Definition at line 147 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers(), get_windows_debug_event(), and handle_output_debug_string().

## ◆ last_sig

enum gdb_signal last_sig = GDB_SIGNAL_0
| static

Definition at line 214 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), get_windows_debug_event(), handle_exception(), and windows_resume().

## ◆ LookupPrivilegeValueA

LookupPrivilegeValueA_ftype* LookupPrivilegeValueA
| static

Definition at line 107 of file windows-nat.c.

## ◆ main_thread_id

DWORD main_thread_id
| static

Definition at line 241 of file windows-nat.c.

Referenced by fake_create_process(), get_windows_debug_event(), handle_output_debug_string(), and windows_delete_thread().

## ◆ mappings

const int* mappings
| static

Definition at line 279 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers(), do_windows_store_inferior_registers(), and windows_set_context_register_offsets().

## ◆ new_console

int new_console = 0
| static

Definition at line 250 of file windows-nat.c.

Referenced by _initialize_windows_nat(), ctrl_c_handler(), and windows_create_inferior().

## ◆ new_group

int new_group = 1
| static

Definition at line 254 of file windows-nat.c.

Referenced by _initialize_windows_nat(), and windows_create_inferior().

## ◆ open_process_used

int open_process_used = 0
| static

Definition at line 247 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), fake_create_process(), and windows_mourn_inferior().

## ◆ OpenProcessToken

OpenProcessToken_ftype* OpenProcessToken
| static

Definition at line 110 of file windows-nat.c.

## ◆ saved_context

CONTEXT saved_context
| static

Definition at line 149 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers(), handle_output_debug_string(), and normal_stop().

## ◆ saw_create

int saw_create
| static

Definition at line 246 of file windows-nat.c.

Referenced by get_windows_debug_event(), windows_attach(), and windows_create_inferior().

## ◆ segment_register_p

segment_register_p_ftype* segment_register_p
| static

Definition at line 283 of file windows-nat.c.

Referenced by do_windows_fetch_inferior_registers(), and windows_set_segment_register_p().

## ◆ solib_end

struct so_list solib_start* solib_end
| static

Definition at line 595 of file windows-nat.c.

Referenced by handle_load_dll(), handle_unload_dll(), windows_add_all_dlls(), and windows_clear_solib().

## ◆ thread_head

windows_thread_info thread_head
| static

Definition at line 233 of file windows-nat.c.

Referenced by thread_rec(), windows_add_thread(), windows_continue(), windows_delete_thread(), and windows_init_thread_list().

## ◆ useshell

int useshell = 0
| static

Definition at line 259 of file windows-nat.c.

Referenced by _initialize_windows_nat(), and windows_create_inferior().

## ◆ windows_initialization_done

int windows_initialization_done
| static

Definition at line 176 of file windows-nat.c.

Referenced by do_initial_windows_stuff(), and get_windows_debug_event().

## ◆ xlate

const struct xlate_exception xlate[]
| static

Initial value:
=
{
{EXCEPTION_ACCESS_VIOLATION, GDB_SIGNAL_SEGV},
{STATUS_STACK_OVERFLOW, GDB_SIGNAL_SEGV},
{EXCEPTION_BREAKPOINT, GDB_SIGNAL_TRAP},
{DBG_CONTROL_C, GDB_SIGNAL_INT},
{EXCEPTION_SINGLE_STEP, GDB_SIGNAL_TRAP},
{STATUS_FLOAT_DIVIDE_BY_ZERO, GDB_SIGNAL_FPE},
{-1, GDB_SIGNAL_UNKNOWN}}

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

Referenced by windows_resume().