summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-09-07 21:00:30 +0000
committermidipix <writeonce@midipix.org>2019-09-07 21:01:12 +0000
commit5221bc6179e6bf7dc7f231ecbe2f936a401adf17 (patch)
tree90b8c1d71f898c8bde82d21ff5a2cc252c97b881
parentcd305f19d57035e60b6b22be0edab31af73b7195 (diff)
downloadmmglue-5221bc6179e6bf7dc7f231ecbe2f936a401adf17.tar.bz2
mmglue-5221bc6179e6bf7dc7f231ecbe2f936a401adf17.tar.xz
nt32/nt64: debug interfaces: added __dbg_regs_fetch(), __dbg_regs_store().
-rw-r--r--include/sys/debug.h4
-rw-r--r--src/arch/nt32/debug.c10
-rw-r--r--src/arch/nt64/debug.c10
3 files changed, 24 insertions, 0 deletions
diff --git a/include/sys/debug.h b/include/sys/debug.h
index b207363..d66d0ac 100644
--- a/include/sys/debug.h
+++ b/include/sys/debug.h
@@ -161,6 +161,10 @@ int __dbg_lbreak(int);
ssize_t __dbg_vm_read(int, void *, size_t, uintptr_t);
ssize_t __dbg_vm_write(int, const void *, size_t, uintptr_t);
+/* thread register context */
+int __dbg_regs_fetch(int, pid_t, mcontext_t *);
+int __dbg_regs_store(int, pid_t, const mcontext_t *);
+
/* suspend/resume thread; return previous suspend count (negative for an error) */
int __dbg_suspend_thread(int, pid_t);
int __dbg_resume_thread(int, pid_t);
diff --git a/src/arch/nt32/debug.c b/src/arch/nt32/debug.c
index e8132be..77c8074 100644
--- a/src/arch/nt32/debug.c
+++ b/src/arch/nt32/debug.c
@@ -57,6 +57,16 @@ ssize_t __dbg_vm_write(int pfd, const void * buf, size_t len, uintptr_t addr)
return syscall(SYS_dbg_vm_write,pfd,buf,len,addr);
}
+int __dbg_regs_fetch(int pfd, pid_t tid, mcontext_t * regctx)
+{
+ return syscall(SYS_dbg_regs_fetch,pfd,tid,regctx);
+}
+
+int __dbg_regs_store(int pfd, pid_t tid, const mcontext_t * regctx)
+{
+ return syscall(SYS_dbg_regs_store,pfd,tid,regctx);
+}
+
int __dbg_suspend_thread(int pfd, pid_t tid)
{
return syscall(SYS_dbg_suspend_thread,pfd,tid);
diff --git a/src/arch/nt64/debug.c b/src/arch/nt64/debug.c
index e8132be..77c8074 100644
--- a/src/arch/nt64/debug.c
+++ b/src/arch/nt64/debug.c
@@ -57,6 +57,16 @@ ssize_t __dbg_vm_write(int pfd, const void * buf, size_t len, uintptr_t addr)
return syscall(SYS_dbg_vm_write,pfd,buf,len,addr);
}
+int __dbg_regs_fetch(int pfd, pid_t tid, mcontext_t * regctx)
+{
+ return syscall(SYS_dbg_regs_fetch,pfd,tid,regctx);
+}
+
+int __dbg_regs_store(int pfd, pid_t tid, const mcontext_t * regctx)
+{
+ return syscall(SYS_dbg_regs_store,pfd,tid,regctx);
+}
+
int __dbg_suspend_thread(int pfd, pid_t tid)
{
return syscall(SYS_dbg_suspend_thread,pfd,tid);