summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
65bafd5)
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".
+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.
+
2020-04-08 Tom Tromey <tromey@adacore.com>
* nat/windows-nat.h (struct windows_thread_info): Declare
2020-04-08 Tom Tromey <tromey@adacore.com>
* nat/windows-nat.h (struct windows_thread_info): Declare
#include "gdbsupport/common-defs.h"
#include "nat/windows-nat.h"
#include "gdbsupport/common-defs.h"
#include "nat/windows-nat.h"
+namespace windows_nat
+{
+
windows_thread_info::~windows_thread_info ()
{
CloseHandle (h);
windows_thread_info::~windows_thread_info ()
{
CloseHandle (h);
+namespace windows_nat
+{
+
/* Thread information structure used to track extra information about
each thread. */
struct windows_thread_info
/* Thread information structure used to track extra information about
each thread. */
struct windows_thread_info
gdb::unique_xmalloc_ptr<char> name;
};
gdb::unique_xmalloc_ptr<char> name;
};
#define STATUS_WX86_BREAKPOINT 0x4000001F
#define STATUS_WX86_SINGLE_STEP 0x4000001E
#define STATUS_WX86_BREAKPOINT 0x4000001F
#define STATUS_WX86_SINGLE_STEP 0x4000001E
+using namespace windows_nat;
+
#define AdjustTokenPrivileges dyn_AdjustTokenPrivileges
#define DebugActiveProcessStop dyn_DebugActiveProcessStop
#define DebugBreakProcess dyn_DebugBreakProcess
#define AdjustTokenPrivileges dyn_AdjustTokenPrivileges
#define DebugActiveProcessStop dyn_DebugActiveProcessStop
#define DebugBreakProcess dyn_DebugBreakProcess
+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>
* win32-low.c (delete_thread_info): Don't call CloseHandle.
#include "server.h"
#include "win32-low.h"
#include "server.h"
#include "win32-low.h"
+using namespace windows_nat;
+
#ifndef CONTEXT_FLOATING_POINT
#define CONTEXT_FLOATING_POINT 0
#endif
#ifndef CONTEXT_FLOATING_POINT
#define CONTEXT_FLOATING_POINT 0
#endif
#include "tdesc.h"
#include "x86-tdesc.h"
#include "tdesc.h"
#include "x86-tdesc.h"
+using namespace windows_nat;
+
#ifndef CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS 0
#endif
#ifndef CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS 0
#endif
#include "gdbsupport/common-inferior.h"
#include "gdbsupport/gdb_wait.h"
#include "gdbsupport/common-inferior.h"
#include "gdbsupport/gdb_wait.h"
+using namespace windows_nat;
+
#ifndef USE_WIN32API
#include <sys/cygwin.h>
#endif
#ifndef USE_WIN32API
#include <sys/cygwin.h>
#endif
void (*initial_stuff) (void);
/* Fetch the context from the inferior. */
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. */
/* 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. */
/* 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,
/* 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,
/* 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;
const unsigned char *breakpoint;
int breakpoint_len;
};
/* Retrieve the context for this thread, if not already retrieved. */
};
/* 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
/* Map the Windows error number in ERROR to a locale-dependent error
message string and return a pointer to it. Typically, the values