1 /* Internal interfaces for the Win32 specific target code for gdbserver.
2 Copyright (C) 2007 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
23 /* Thread information structure used to track extra information about
25 typedef struct win32_thread_info
33 struct win32_target_ops
35 /* An array of offset mappings into a Win32 Context structure.
36 This is a one-to-one mapping which is indexed by gdb's register
37 numbers. It retrieves an offset into the context structure where
38 the 4 byte register is located.
39 An offset value of -1 indicates that Win32 does not provide this
40 register in it's CONTEXT structure. In this case regptr will return
41 a pointer into a dummy register. */
44 /* The number of elements of regmap. */
47 void (*initial_stuff
) (void);
49 void (*store_debug_registers
) (win32_thread_info
*);
50 void (*load_debug_registers
) (win32_thread_info
*);
52 /* Fetch register(s) from gdbserver regcache data. */
53 void (*fetch_inferior_registers
) (win32_thread_info
*th
, int r
);
55 void (*single_step
) (win32_thread_info
*th
);
57 const unsigned char *breakpoint
;
60 /* What string to report to GDB when it asks for the architecture,
61 or NULL not to answer. */
62 const char *arch_string
;
65 extern struct win32_target_ops the_low_target
;
69 /* Return a pointer into a CONTEXT field indexed by gdb register number.
70 Return a pointer to an dummy register holding zero if there is no
71 corresponding CONTEXT field for the given register number. */
72 extern char * regptr (CONTEXT
* c
, int r
);
74 /* Map the Windows error number in ERROR to a locale-dependent error
75 message string and return a pointer to it. Typically, the values
76 for ERROR come from GetLastError.
78 The string pointed to shall not be modified by the application,
79 but may be overwritten by a subsequent call to strwinerror
81 The strwinerror function does not change the current setting
83 extern char * strwinerror (DWORD error
);
85 /* in wincecompat.c */
87 extern void to_back_slashes (char *);