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:58 -0600
commit4834dad062658ef49ef86c9c48eb004c48a242a5 (patch)
tree2ca8bcb623b43181fc73c18781f3b4045ea053de /gdbserver
parent65bafd5b156bcb4f308f304e55a03e13f4eb2bed (diff)
downloadgdb-4834dad062658ef49ef86c9c48eb004c48a242a5.zip
gdb-4834dad062658ef49ef86c9c48eb004c48a242a5.tar.gz
gdb-4834dad062658ef49ef86c9c48eb004c48a242a5.tar.bz2
Wrap shared windows-nat code in windows_nat namespace
This wraps the shared windows-nat code in a windows_nat namespace. This helps avoid name clashes. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c: Add "using namespace". * nat/windows-nat.h: Wrap contents in windows_nat namespace. * nat/windows-nat.c: Wrap contents in windows_nat namespace. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (struct win32_target_ops): Use qualified names where needed. * win32-i386-low.c: Add "using namespace". * win32-low.c: Add "using namespace". * win32-arm-low.c: Add "using namespace".
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/ChangeLog8
-rw-r--r--gdbserver/win32-arm-low.cc2
-rw-r--r--gdbserver/win32-i386-low.cc2
-rw-r--r--gdbserver/win32-low.cc2
-rw-r--r--gdbserver/win32-low.h16
5 files changed, 23 insertions, 7 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index e727413..8de29e5 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,5 +1,13 @@
2020-04-08 Tom Tromey <tromey@adacore.com>
+ * win32-low.h (struct win32_target_ops): Use qualified names where
+ needed.
+ * win32-i386-low.c: Add "using namespace".
+ * win32-low.c: Add "using namespace".
+ * win32-arm-low.c: Add "using namespace".
+
+2020-04-08 Tom Tromey <tromey@adacore.com>
+
* win32-low.c (delete_thread_info): Don't call CloseHandle.
2020-04-08 Tom Tromey <tromey@adacore.com>
diff --git a/gdbserver/win32-arm-low.cc b/gdbserver/win32-arm-low.cc
index c50c5df..78b7fd0 100644
--- a/gdbserver/win32-arm-low.cc
+++ b/gdbserver/win32-arm-low.cc
@@ -18,6 +18,8 @@
#include "server.h"
#include "win32-low.h"
+using namespace windows_nat;
+
#ifndef CONTEXT_FLOATING_POINT
#define CONTEXT_FLOATING_POINT 0
#endif
diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index 1b78cf9..1c14bc7 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -26,6 +26,8 @@
#include "tdesc.h"
#include "x86-tdesc.h"
+using namespace windows_nat;
+
#ifndef CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS 0
#endif
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index c642d47..8f8b6ce 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -36,6 +36,8 @@
#include "gdbsupport/common-inferior.h"
#include "gdbsupport/gdb_wait.h"
+using namespace windows_nat;
+
#ifndef USE_WIN32API
#include <sys/cygwin.h>
#endif
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index 28ac2b0..917f727 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -40,23 +40,25 @@ struct win32_target_ops
void (*initial_stuff) (void);
/* Fetch the context from the inferior. */
- void (*get_thread_context) (windows_thread_info *th);
+ void (*get_thread_context) (windows_nat::windows_thread_info *th);
/* Called just before resuming the thread. */
- void (*prepare_to_resume) (windows_thread_info *th);
+ void (*prepare_to_resume) (windows_nat::windows_thread_info *th);
/* Called when a thread was added. */
- void (*thread_added) (windows_thread_info *th);
+ void (*thread_added) (windows_nat::windows_thread_info *th);
/* Fetch register from gdbserver regcache data. */
void (*fetch_inferior_register) (struct regcache *regcache,
- windows_thread_info *th, int r);
+ windows_nat::windows_thread_info *th,
+ int r);
/* Store a new register value into the thread context of TH. */
void (*store_inferior_register) (struct regcache *regcache,
- windows_thread_info *th, int r);
+ windows_nat::windows_thread_info *th,
+ int r);
- void (*single_step) (windows_thread_info *th);
+ void (*single_step) (windows_nat::windows_thread_info *th);
const unsigned char *breakpoint;
int breakpoint_len;
@@ -143,7 +145,7 @@ public:
};
/* Retrieve the context for this thread, if not already retrieved. */
-extern void win32_require_context (windows_thread_info *th);
+extern void win32_require_context (windows_nat::windows_thread_info *th);
/* Map the Windows error number in ERROR to a locale-dependent error
message string and return a pointer to it. Typically, the values