Commit | Line | Data |
---|---|---|
ae1f8880 TT |
1 | /* Internal interfaces for the Windows code |
2 | Copyright (C) 1995-2020 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 | |
8 | the Free Software Foundation; either version 3 of the License, or | |
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 | |
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
18 | ||
19 | #ifndef NAT_WINDOWS_NAT_H | |
20 | #define NAT_WINDOWS_NAT_H | |
21 | ||
22 | #include <windows.h> | |
23 | ||
24 | /* Thread information structure used to track extra information about | |
25 | each thread. */ | |
26 | struct windows_thread_info | |
27 | { | |
28 | /* The Win32 thread identifier. */ | |
29 | DWORD tid; | |
30 | ||
31 | /* The handle to the thread. */ | |
32 | HANDLE h; | |
33 | ||
34 | /* Thread Information Block address. */ | |
35 | CORE_ADDR thread_local_base; | |
36 | ||
37 | /* Non zero if SuspendThread was called on this thread. */ | |
38 | int suspended; | |
39 | ||
40 | #ifdef _WIN32_WCE | |
41 | /* The context as retrieved right after suspending the thread. */ | |
42 | CONTEXT base_context; | |
43 | #endif | |
44 | ||
45 | /* The context of the thread, including any manipulations. */ | |
46 | union | |
47 | { | |
48 | CONTEXT context; | |
49 | #ifdef __x86_64__ | |
50 | WOW64_CONTEXT wow64_context; | |
51 | #endif | |
52 | }; | |
53 | ||
54 | /* Whether debug registers changed since we last set CONTEXT back to | |
55 | the thread. */ | |
56 | int debug_registers_changed; | |
57 | ||
58 | /* Nonzero if CONTEXT is invalidated and must be re-read from the | |
59 | inferior thread. */ | |
60 | int reload_context; | |
61 | ||
62 | /* The name of the thread, allocated by xmalloc. */ | |
63 | char *name; | |
64 | }; | |
65 | ||
66 | #endif |