summaryrefslogtreecommitdiff
path: root/overlay/mgdb/gdb/winnt-nat.h
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/mgdb/gdb/winnt-nat.h')
-rw-r--r--overlay/mgdb/gdb/winnt-nat.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.h b/overlay/mgdb/gdb/winnt-nat.h
new file mode 100644
index 0000000..c99d3f4
--- /dev/null
+++ b/overlay/mgdb/gdb/winnt-nat.h
@@ -0,0 +1,57 @@
+/***************************************************************/
+/* mgdb: midipix-specific bits for gdb */
+/* Copyright (C) 2019 Z. Gilboa */
+/* Released under GPLv2 and GPLv3; see COPYING.MGDB. */
+/***************************************************************/
+
+#ifndef WINNT_NAT_H
+#define WINNT_NAT_H
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <sys/cmd.h>
+#include <sys/debug.h>
+
+#define WINNT_DR_STATE_DIRTY (0x1)
+
+#define WINNT_THREAD_CONTEXT_READY (0X0)
+#define WINNT_THREAD_CONTEXT_DIRTY (0Xffffffff)
+
+struct regcache;
+
+struct winnt_process;
+struct winnt_thread;
+
+struct winnt_process {
+ int pfd;
+ pid_t pid;
+ pid_t syspid;
+ pid_t systid;
+ pid_t flags;
+ int nmodules;
+ struct __dbg_module_info * modules;
+ struct __dbg_event event;
+ char * solibs;
+ uintptr_t dr_cache[8];
+ uint32_t dr_state;
+ struct winnt_thread * threads;
+};
+
+struct winnt_thread {
+ struct winnt_thread * next;
+ struct winnt_process * process;
+ pid_t tid;
+ uint32_t state;
+ mcontext_t regctx;
+};
+
+void amd64_winnt_fetch_registers(
+ struct regcache *, int regnum,
+ struct winnt_thread *);
+
+void i386_winnt_fetch_registers(
+ struct regcache *, int regnum,
+ struct winnt_thread *);
+
+#endif