]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/win32-low.h
*** empty log message ***
[thirdparty/binutils-gdb.git] / gdb / gdbserver / win32-low.h
CommitLineData
68070c10
PA
1/* Internal interfaces for the Win32 specific target code for gdbserver.
2 Copyright (C) 2007 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
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
a9762ec7 8 the Free Software Foundation; either version 3 of the License, or
68070c10
PA
9 (at your option) any later version.
10
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.
15
16 You should have received a copy of the GNU General Public License
a9762ec7 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
68070c10
PA
18
19#include <windows.h>
20
21/* Thread information structure used to track extra information about
22 each thread. */
23typedef struct win32_thread_info
24{
25 DWORD tid;
26 HANDLE h;
27 int suspend_count;
28 CONTEXT context;
29} win32_thread_info;
30
31struct win32_target_ops
32{
34b34921 33 /* The number of target registers. */
68070c10
PA
34 int num_regs;
35
34b34921 36 /* Perform initializations on startup. */
68070c10
PA
37 void (*initial_stuff) (void);
38
34b34921
PA
39 /* Fetch the context from the inferior. */
40 void (*get_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
68070c10 41
34b34921
PA
42 /* Flush the context back to the inferior. */
43 void (*set_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
44
45 /* Called when a thread was added. */
46 void (*thread_added) (win32_thread_info *th);
47
48 /* Fetch register from gdbserver regcache data. */
49 void (*fetch_inferior_register) (win32_thread_info *th, int r);
50
51 /* Store a new register value into the thread context of TH. */
52 void (*store_inferior_register) (win32_thread_info *th, int r);
68070c10
PA
53
54 void (*single_step) (win32_thread_info *th);
55
56 const unsigned char *breakpoint;
57 int breakpoint_len;
58
59 /* What string to report to GDB when it asks for the architecture,
60 or NULL not to answer. */
61 const char *arch_string;
62};
63
64extern struct win32_target_ops the_low_target;
65
68070c10
PA
66/* Map the Windows error number in ERROR to a locale-dependent error
67 message string and return a pointer to it. Typically, the values
68 for ERROR come from GetLastError.
69
70 The string pointed to shall not be modified by the application,
71 but may be overwritten by a subsequent call to strwinerror
72
73 The strwinerror function does not change the current setting
74 of GetLastError. */
75extern char * strwinerror (DWORD error);
76
77/* in wincecompat.c */
78
79extern void to_back_slashes (char *);