aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
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 /gdbserver
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 'gdbserver')
-rw-r--r--gdbserver/ChangeLog4
-rw-r--r--gdbserver/win32-low.h30
2 files changed, 5 insertions, 29 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 234d842..3923429 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
2020-04-08 Tom Tromey <tromey@adacore.com>
+ * win32-low.h (struct windows_thread_info): Remove.
+
+2020-04-08 Tom Tromey <tromey@adacore.com>
+
* win32-low.h (struct windows_thread_info): Rename from
win32_thread_info. Remove typedef.
(struct win32_target_ops, win32_require_context): Update.
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index 2bd94e8..28ac2b0 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -20,6 +20,7 @@
#define GDBSERVER_WIN32_LOW_H
#include <windows.h>
+#include "nat/windows-nat.h"
struct target_desc;
@@ -27,35 +28,6 @@ struct target_desc;
Windows ports support neither bi-arch nor multi-process. */
extern const struct target_desc *win32_tdesc;
-/* Thread information structure used to track extra information about
- each thread. */
-struct windows_thread_info
-{
- /* The Win32 thread identifier. */
- DWORD tid;
-
- /* The handle to the thread. */
- HANDLE h;
-
- /* Thread Information Block address. */
- CORE_ADDR thread_local_base;
-
- /* Non zero if SuspendThread was called on this thread. */
- int suspended;
-
-#ifdef _WIN32_WCE
- /* The context as retrieved right after suspending the thread. */
- CONTEXT base_context;
-#endif
-
- /* The context of the thread, including any manipulations. */
- CONTEXT context;
-
- /* Whether debug registers changed since we last set CONTEXT back to
- the thread. */
- int debug_registers_changed;
-};
-
struct win32_target_ops
{
/* Architecture-specific setup. */