summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-09-07 20:12:40 +0000
committermidipix <writeonce@midipix.org>2019-09-07 21:01:04 +0000
commitcd305f19d57035e60b6b22be0edab31af73b7195 (patch)
tree7acea22c3e8e4a08c12209a5cbeda762e456d770
parent2d2bf110c72823b912debe2e70bd22a270db660a (diff)
downloadmmglue-cd305f19d57035e60b6b22be0edab31af73b7195.tar.bz2
mmglue-cd305f19d57035e60b6b22be0edab31af73b7195.tar.xz
nt32/nt64: debug interfaces: added __dbg_vm_read(), __dbg_vm_write().
-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 4f1929f..b207363 100644
--- a/include/sys/debug.h
+++ b/include/sys/debug.h
@@ -157,6 +157,10 @@ int __dbg_rbreak(int);
int __dbg_tbreak(int);
int __dbg_lbreak(int);
+/* virtual memory */
+ssize_t __dbg_vm_read(int, void *, size_t, uintptr_t);
+ssize_t __dbg_vm_write(int, const void *, size_t, uintptr_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 efb773b..e8132be 100644
--- a/src/arch/nt32/debug.c
+++ b/src/arch/nt32/debug.c
@@ -47,6 +47,16 @@ int __dbg_lbreak(int pfd)
return syscall(SYS_dbg_lbreak,pfd);
}
+ssize_t __dbg_vm_read(int pfd, void * buf, size_t len, uintptr_t addr)
+{
+ return syscall(SYS_dbg_vm_read,pfd,buf,len,addr);
+}
+
+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_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 efb773b..e8132be 100644
--- a/src/arch/nt64/debug.c
+++ b/src/arch/nt64/debug.c
@@ -47,6 +47,16 @@ int __dbg_lbreak(int pfd)
return syscall(SYS_dbg_lbreak,pfd);
}
+ssize_t __dbg_vm_read(int pfd, void * buf, size_t len, uintptr_t addr)
+{
+ return syscall(SYS_dbg_vm_read,pfd,buf,len,addr);
+}
+
+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_suspend_thread(int pfd, pid_t tid)
{
return syscall(SYS_dbg_suspend_thread,pfd,tid);