GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-7.10/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 "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 "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"

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
 

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

Typedefs

typedef struct windows_thread_info_struct windows_thread_info
 

Enumerations

enum  { FLAG_TRACE_BIT = 0x100 }
 

Functions

static void windows_stop (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_infothread_rec (DWORD id, int get_context)
 
static windows_thread_infowindows_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, 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, int r)
 
static void windows_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int r)
 
static struct so_listwindows_make_so (const char *name, LPVOID load_addr)
 
static char * get_image_name (HANDLE h, void *address, int unicode)
 
static int handle_load_dll (void *dummy)
 
static void windows_free_so (struct so_list *so)
 
static int handle_unload_dll (void *dummy)
 
static void windows_clear_solib (void)
 
static int handle_output_debug_string (struct target_waitstatus *ourstatus)
 
static int display_selector (HANDLE thread, DWORD sel)
 
static void display_selectors (char *args, int from_tty)
 
static int 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 void windows_create_inferior (struct target_ops *ops, char *exec_file, char *allargs, 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 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 struct target_opswindows_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 BOOL WINAPI(* AdjustTokenPrivileges )(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD)
 
static BOOL WINAPI(* DebugActiveProcessStop )(DWORD)
 
static BOOL WINAPI(* DebugBreakProcess )(HANDLE)
 
static BOOL WINAPI(* DebugSetProcessKillOnExit )(BOOL)
 
static BOOL WINAPI(* EnumProcessModules )(HANDLE, HMODULE *, DWORD, LPDWORD)
 
static BOOL WINAPI(* GetModuleInformation )(HANDLE, HMODULE, LPMODULEINFO, DWORD)
 
static BOOL WINAPI(* LookupPrivilegeValueA )(LPCSTR, LPCSTR, PLUID)
 
static BOOL WINAPI(* OpenProcessToken )(HANDLE, DWORD, PHANDLE)
 
static BOOL WINAPI(* GetCurrentConsoleFont )(HANDLE, BOOL, CONSOLE_FONT_INFO *)
 
static COORD WINAPI(* GetConsoleFontSize )(HANDLE, DWORD)
 
static DWORD WINAPI(* GetModuleFileNameEx )(HANDLE, HMODULE, LPSTR, DWORD)
 
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_infocurrent_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 intmappings
 
static segment_register_p_ftypesegment_register_p
 
static const struct xlate_exception xlate []
 
static struct so_list solib_start * solib_end
 
initialize_file_ftype _initialize_windows_nat
 
initialize_file_ftype _initialize_check_for_gdb_ini
 
initialize_file_ftype _initialize_loadable
 

Macro Definition Documentation

#define __PMAX   (MAX_PATH + 1)
#define _CYGWIN_SIGNAL_STRING   "cYgSiGw00f"

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

Referenced by handle_output_debug_string().

#define AdjustTokenPrivileges   dyn_AdjustTokenPrivileges

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

Referenced by _initialize_loadable(), and set_process_privilege().

#define bad_GetModuleFileNameEx   bad_GetModuleFileNameExA

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

Referenced by _initialize_loadable().

#define CHECK (   x)    check (x, __FILE__,__LINE__)
#define CONTEXT_DEBUGGER_DR
Value:
CONTEXT_FULL | CONTEXT_FLOATING_POINT \
| CONTEXT_SEGMENTS | CONTEXT_DEBUG_REGISTERS \
#define CONTEXT_EXTENDED_REGISTERS
Definition: windows-nat.c:139

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

Referenced by do_windows_fetch_inferior_registers().

#define CONTEXT_EXTENDED_REGISTERS   0

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

#define CreateProcess   CreateProcessA

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

Referenced by windows_create_inferior().

#define DEBUG_EVENTS (   x)    if (debug_events) printf_unfiltered x
#define DEBUG_EXCEPT (   x)    if (debug_exceptions) printf_unfiltered x

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

Referenced by windows_resume().

#define DEBUG_EXCEPTION_SIMPLE (   x)
Value:
printf_unfiltered ("gdb: Target exception %s at %s\n", x, \
current_event.u.Exception.ExceptionRecord.ExceptionAddress))
void printf_unfiltered(const char *format,...)
Definition: utils.c:2399
static int debug_exceptions
Definition: windows-nat.c:219
static DEBUG_EVENT current_event
Definition: windows-nat.c:198

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

Referenced by handle_exception().

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

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

Referenced by windows_resume().

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

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

Referenced by windows_xfer_memory().

#define DebugActiveProcessStop   dyn_DebugActiveProcessStop

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

Referenced by _initialize_loadable(), and windows_detach().

#define DebugBreakProcess   dyn_DebugBreakProcess

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

Referenced by _initialize_loadable(), and ctrl_c_handler().

#define DebugSetProcessKillOnExit   dyn_DebugSetProcessKillOnExit

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

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

#define DR6_CLEAR_VALUE   0xffff0ff0

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

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

#define EnumProcessModules   dyn_EnumProcessModules
#define GetConsoleFontSize   dyn_GetConsoleFontSize

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

Referenced by _initialize_loadable(), and windows_set_console_info().

#define GetCurrentConsoleFont   dyn_GetCurrentConsoleFont

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

Referenced by _initialize_loadable(), and windows_set_console_info().

#define GetModuleFileNameEx_name   "GetModuleFileNameExA"

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

Referenced by _initialize_loadable().

#define GetModuleInformation   dyn_GetModuleInformation

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

Referenced by _initialize_loadable(), and windows_add_all_dlls().

#define LookupPrivilegeValueA   dyn_LookupPrivilegeValueA

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

Referenced by _initialize_loadable(), and set_process_privilege().

#define OpenProcessToken   dyn_OpenProcessToken

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

Referenced by _initialize_loadable(), and set_process_privilege().

#define STARTUPINFO   STARTUPINFOA

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

Referenced by windows_create_inferior().

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
FLAG_TRACE_BIT 

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

Function Documentation

void _initialize_check_for_gdb_ini ( void  )

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

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

void _initialize_loadable ( void  )
void _initialize_windows_nat ( void  )
static BOOL WINAPI bad_DebugActiveProcessStop ( DWORD  w)
static

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

Referenced by _initialize_loadable().

static BOOL WINAPI bad_DebugBreakProcess ( HANDLE  w)
static

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

Referenced by _initialize_loadable().

static BOOL WINAPI bad_DebugSetProcessKillOnExit ( BOOL  w)
static

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

Referenced by _initialize_loadable().

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

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

Referenced by _initialize_loadable().

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

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

References size.

Referenced by _initialize_loadable().

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

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

Referenced by _initialize_loadable().

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

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

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

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

Referenced by _initialize_loadable().

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

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

Referenced by _initialize_loadable().

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

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

References printf_filtered().

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

static BOOL WINAPI ctrl_c_handler ( DWORD  event_type)
static
static CORE_ADDR cygwin_get_dr ( int  i)
static

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

References dr.

Referenced by _initialize_windows_nat().

static unsigned long cygwin_get_dr6 ( void  )
static

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

References dr.

Referenced by _initialize_windows_nat().

static unsigned long cygwin_get_dr7 ( void  )
static

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

References dr.

Referenced by _initialize_windows_nat().

static void cygwin_set_dr ( int  i,
CORE_ADDR  addr 
)
static

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

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

Referenced by _initialize_windows_nat().

static void cygwin_set_dr7 ( unsigned long  val)
static

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

References debug_registers_changed, debug_registers_used, and dr.

Referenced by _initialize_windows_nat().

static int display_selector ( HANDLE  thread,
DWORD  sel 
)
static

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

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

Referenced by display_selectors().

static void display_selectors ( char *  args,
int  from_tty 
)
static
static void do_initial_windows_stuff ( struct target_ops ops,
DWORD  pid,
int  attaching 
)
static
static void do_windows_fetch_inferior_registers ( struct regcache regcache,
int  r 
)
static
static void do_windows_store_inferior_registers ( const struct regcache regcache,
int  r 
)
static
static int envvar_cmp ( const void *  a,
const void *  b 
)
static

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

Referenced by windows_create_inferior().

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

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

References __PMAX, len, and size.

Referenced by handle_load_dll().

static int get_windows_debug_event ( struct target_ops ops,
int  pid,
struct target_waitstatus ourstatus 
)
static
static int handle_exception ( struct target_waitstatus ourstatus)
static
static int handle_load_dll ( void *  dummy)
static
static int handle_output_debug_string ( struct target_waitstatus ourstatus)
static
static int handle_unload_dll ( void *  dummy)
static
static int set_process_privilege ( const char *  privilege,
BOOL  enable 
)
static

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

References AdjustTokenPrivileges, LookupPrivilegeValueA, OpenProcessToken, and size.

Referenced by windows_attach().

static windows_thread_info* thread_rec ( DWORD  id,
int  get_context 
)
static
static void windows_add_all_dlls ( void  )
static
static windows_thread_info* windows_add_thread ( ptid_t  ptid,
HANDLE  h,
void *  tlb 
)
static
static void windows_attach ( struct target_ops ops,
const char *  args,
int  from_tty 
)
static
static void windows_clear_solib ( void  )
static

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

Referenced by do_initial_windows_stuff().

static void windows_close ( struct target_ops self)
static

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

References DEBUG_EVENTS, inferior_ptid, and ptid_get_pid().

Referenced by windows_target().

static BOOL windows_continue ( DWORD  continue_status,
int  id,
int  killed 
)
static
static void windows_create_inferior ( struct target_ops ops,
char *  exec_file,
char *  allargs,
char **  in_env,
int  from_tty 
)
static
static void windows_delete_thread ( ptid_t  ptid,
DWORD  exit_code 
)
static
static void windows_detach ( struct target_ops ops,
const char *  args,
int  from_tty 
)
static
static void windows_fetch_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  r 
)
static
static void windows_files_info ( struct target_ops ignore)
static
static void windows_free_so ( struct so_list so)
static

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

References so_list::lm_info, and xfree().

Referenced by handle_unload_dll().

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

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

References inferior_ptid, ptid_build(), and ptid_get_pid().

Referenced by windows_target().

static int windows_get_exec_module_filename ( char *  exe_name_ret,
size_t  exe_name_max_len 
)
static
static int windows_get_tib_address ( struct target_ops self,
ptid_t  ptid,
CORE_ADDR addr 
)
static
static void windows_init_thread_list ( void  )
static
static void windows_kill_inferior ( struct target_ops ops)
static
static struct so_list* windows_make_so ( const char *  name,
LPVOID  load_addr 
)
static
static void windows_mourn_inferior ( struct target_ops ops)
static
static char* windows_pid_to_exec_file ( struct target_ops self,
int  pid 
)
static

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

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

Referenced by windows_target().

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

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

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

Referenced by windows_target().

static void windows_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  sig 
)
static
static void windows_set_console_info ( STARTUPINFO si,
DWORD *  flags 
)
static

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

References GetConsoleFontSize, and GetCurrentConsoleFont.

Referenced by windows_create_inferior().

void windows_set_context_register_offsets ( const int offsets)

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

References mappings.

Referenced by _initialize_amd64_windows_nat(), and _initialize_i386_windows_nat().

void windows_set_segment_register_p ( segment_register_p_ftype fun)

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

References segment_register_p.

Referenced by _initialize_amd64_windows_nat(), and _initialize_i386_windows_nat().

static void windows_stop ( struct target_ops self,
ptid_t  ptid 
)
static

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

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

Referenced by windows_target().

static void windows_store_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  r 
)
static
static struct target_ops* windows_target ( void  )
static
static int windows_thread_alive ( struct target_ops ops,
ptid_t  ptid 
)
static

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

References gdb_assert, ptid_get_tid(), and thread_rec().

Referenced by windows_target().

static ptid_t windows_wait ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus ourstatus,
int  options 
)
static
static enum target_xfer_status windows_xfer_memory ( gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  memaddr,
ULONGEST  len,
ULONGEST xfered_len 
)
static
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
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

Variable Documentation

initialize_file_ftype _initialize_check_for_gdb_ini
initialize_file_ftype _initialize_loadable
initialize_file_ftype _initialize_windows_nat
BOOL WINAPI(* AdjustTokenPrivileges) (HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD)
static

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

DEBUG_EVENT current_event
static
HANDLE current_process_handle
static
windows_thread_info* current_thread
static
int debug_events = 0
static

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

Referenced by _initialize_windows_nat().

int debug_exceptions = 0
static

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

Referenced by _initialize_windows_nat().

int debug_exec = 0
static

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

Referenced by _initialize_windows_nat().

int debug_memory = 0
static

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

Referenced by _initialize_windows_nat().

int debug_registers_changed
static
int debug_registers_used
static
BOOL WINAPI(* DebugActiveProcessStop) (DWORD)
static

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

BOOL WINAPI(* DebugBreakProcess) (HANDLE)
static

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

BOOL WINAPI(* DebugSetProcessKillOnExit) (BOOL)
static

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

uintptr_t dr[8]
static
BOOL WINAPI(* EnumProcessModules) (HANDLE, HMODULE *, DWORD, LPDWORD)
static

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

int event_count = 0
static

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

Referenced by do_initial_windows_stuff(), and get_windows_debug_event().

int exception_count = 0
static

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

Referenced by do_initial_windows_stuff(), and handle_exception().

COORD WINAPI(* GetConsoleFontSize) (HANDLE, DWORD)
static

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

BOOL WINAPI(* GetCurrentConsoleFont) (HANDLE, BOOL, CONSOLE_FONT_INFO *)
static

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

DWORD WINAPI(* GetModuleFileNameEx) (HANDLE, HMODULE, LPSTR, DWORD)
static
BOOL WINAPI(* GetModuleInformation) (HANDLE, HMODULE, LPMODULEINFO, DWORD)
static

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

int have_saved_context
static
enum gdb_signal last_sig = GDB_SIGNAL_0
static
BOOL WINAPI(* LookupPrivilegeValueA) (LPCSTR, LPCSTR, PLUID)
static

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

DWORD main_thread_id
static
const int* mappings
static
int new_console = 0
static

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

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

int new_group = 1
static

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

Referenced by _initialize_windows_nat(), and windows_create_inferior().

int open_process_used = 0
static
BOOL WINAPI(* OpenProcessToken) (HANDLE, DWORD, PHANDLE)
static

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

CONTEXT saved_context
static
int saw_create
static

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

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

segment_register_p_ftype* segment_register_p
static
struct so_list solib_start* solib_end
static

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

windows_thread_info thread_head
static

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

Referenced by windows_init_thread_list().

int useshell = 0
static

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

Referenced by _initialize_windows_nat(), and windows_create_inferior().

int windows_initialization_done
static

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

Referenced by do_initial_windows_stuff(), and get_windows_debug_event().

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, -1}}

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