* win32-low.c (soft_interrupt_requested, faked_breakpoint): New
[deliverable/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{
c436e841 25 /* The Win32 thread identifier. */
68070c10 26 DWORD tid;
c436e841
PA
27
28 /* The handle to the thread. */
68070c10 29 HANDLE h;
c436e841
PA
30
31 /* Non zero if SuspendThread was called on this thread. */
32 int suspended;
33
34 /* The context of the thread. */
68070c10
PA
35 CONTEXT context;
36} win32_thread_info;
37
38struct win32_target_ops
39{
34b34921 40 /* The number of target registers. */
68070c10
PA
41 int num_regs;
42
34b34921 43 /* Perform initializations on startup. */
68070c10
PA
44 void (*initial_stuff) (void);
45
34b34921
PA
46 /* Fetch the context from the inferior. */
47 void (*get_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
68070c10 48
34b34921
PA
49 /* Flush the context back to the inferior. */
50 void (*set_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
51
52 /* Called when a thread was added. */
53 void (*thread_added) (win32_thread_info *th);
54
55 /* Fetch register from gdbserver regcache data. */
56 void (*fetch_inferior_register) (win32_thread_info *th, int r);
57
58 /* Store a new register value into the thread context of TH. */
59 void (*store_inferior_register) (win32_thread_info *th, int r);
68070c10
PA
60
61 void (*single_step) (win32_thread_info *th);
62
63 const unsigned char *breakpoint;
64 int breakpoint_len;
65
66 /* What string to report to GDB when it asks for the architecture,
67 or NULL not to answer. */
68 const char *arch_string;
69};
70
71extern struct win32_target_ops the_low_target;
72
68070c10
PA
73/* Map the Windows error number in ERROR to a locale-dependent error
74 message string and return a pointer to it. Typically, the values
75 for ERROR come from GetLastError.
76
77 The string pointed to shall not be modified by the application,
78 but may be overwritten by a subsequent call to strwinerror
79
80 The strwinerror function does not change the current setting
81 of GetLastError. */
82extern char * strwinerror (DWORD error);
83
84/* in wincecompat.c */
85
86extern void to_back_slashes (char *);
This page took 0.071617 seconds and 4 git commands to generate.