aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-04-08 14:33:35 -0600
committerTom Tromey <tromey@adacore.com>2020-04-08 14:47:57 -0600
commitae1f8880758d8087ad9fdb137d45c4abc1137b52 (patch)
treeed4414c3a897650c246b2d9c972f00ffe90721f0 /gdb/windows-nat.c
parent55a1e039f9d5e2ae144b64f52f2034e4f9177336 (diff)
downloadgdb-ae1f8880758d8087ad9fdb137d45c4abc1137b52.zip
gdb-ae1f8880758d8087ad9fdb137d45c4abc1137b52.tar.gz
gdb-ae1f8880758d8087ad9fdb137d45c4abc1137b52.tar.bz2
Share windows_thread_info between gdb and gdbserver
This introduces a new file, nat/windows-nat.h, which holds the definition of windows_thread_info. This is now shared between gdb and gdbserver. Note that the two implementations different slightly. gdb had a couple of fields ("name" and "reload_context") that gdbserver did not; while gdbserver had one field ("base_context") that gdb did not, plus better comments. The new file preserves all the fields, and the comments. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (struct windows_thread_info): Remove. * nat/windows-nat.h: New file. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (struct windows_thread_info): Remove.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 837359e..9368396 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -70,6 +70,7 @@
#include "gdbsupport/gdb_tilde_expand.h"
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/gdb_wait.h"
+#include "nat/windows-nat.h"
#define STATUS_WX86_BREAKPOINT 0x4000001F
#define STATUS_WX86_SINGLE_STEP 0x4000001E
@@ -244,25 +245,6 @@ static unsigned long cygwin_get_dr7 (void);
static enum gdb_signal last_sig = GDB_SIGNAL_0;
/* Set if a signal was received from the debugged process. */
-/* Thread information structure used to track information that is
- not available in gdb's thread structure. */
-struct windows_thread_info
- {
- DWORD tid;
- HANDLE h;
- CORE_ADDR thread_local_base;
- char *name;
- int suspended;
- int reload_context;
- union
- {
- CONTEXT context;
-#ifdef __x86_64__
- WOW64_CONTEXT wow64_context;
-#endif
- };
- };
-
static std::vector<windows_thread_info *> thread_list;
/* The process and thread handles for the above context. */