diff options
author | midipix <writeonce@midipix.org> | 2019-09-15 19:12:33 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-09-16 07:07:34 +0000 |
commit | 0354669846be9be0d0353a6aa83297a1021c910d (patch) | |
tree | 0ed25c575bc3f8cf24cb4722565cf03d293ed5d4 /overlay/mgdb/gdb/winnt-nat.h | |
parent | b3b28e32623963e72eee2849dca3b57b0cc215f8 (diff) | |
download | chainport-0354669846be9be0d0353a6aa83297a1021c910d.tar.bz2 chainport-0354669846be9be0d0353a6aa83297a1021c910d.tar.xz |
mgdb: struct winnt_thread and friends: initial implementation and integration.
Diffstat (limited to 'overlay/mgdb/gdb/winnt-nat.h')
-rw-r--r-- | overlay/mgdb/gdb/winnt-nat.h | 57 |
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 |