summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/sys/debug.h17
-rw-r--r--src/arch/nt32/debug.c10
-rw-r--r--src/arch/nt64/debug.c10
3 files changed, 37 insertions, 0 deletions
diff --git a/include/sys/debug.h b/include/sys/debug.h
index d66d0ac..38a7e13 100644
--- a/include/sys/debug.h
+++ b/include/sys/debug.h
@@ -29,6 +29,19 @@ enum __dbg_state {
__DBG_STATE_DLL_UNLOAD,
};
+/* debug process/session info */
+enum __dbg_info {
+ __DBG_INFO_IMAGE_RPATH,
+ __DBG_INFO_IMAGE_NPATH,
+ __DBG_INFO_IMAGE_APATH,
+ __DBG_INFO_IMAGE_DPATH,
+ __DBG_INFO_REPORTED_IMAGE_RPATH,
+ __DBG_INFO_REPORTED_IMAGE_APATH,
+ __DBG_INFO_REPORTED_IMAGE_NPATH,
+ __DBG_INFO_REPORTED_IMAGE_DPATH,
+ __DBG_INFO_CAP,
+};
+
/* debug responses */
#define __DBG_RESPONSE_CONTINUE (0x00010002)
#define __DBG_RESPONSE_EXCEPTION_HANDLED (0x00010001)
@@ -165,6 +178,10 @@ ssize_t __dbg_vm_write(int, const void *, size_t, uintptr_t);
int __dbg_regs_fetch(int, pid_t, mcontext_t *);
int __dbg_regs_store(int, pid_t, const mcontext_t *);
+/* debug information */
+ssize_t __dbg_info_get(int, pid_t, int, void *, size_t);
+ssize_t __dbg_info_set(int, pid_t, int, const void *, size_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 77c8074..e99a83e 100644
--- a/src/arch/nt32/debug.c
+++ b/src/arch/nt32/debug.c
@@ -67,6 +67,16 @@ int __dbg_regs_store(int pfd, pid_t tid, const mcontext_t * regctx)
return syscall(SYS_dbg_regs_store,pfd,tid,regctx);
}
+ssize_t __dbg_info_get(int pfd, pid_t tid, int type, void * buf, size_t len)
+{
+ return syscall(SYS_dbg_info_get,pfd,tid,type,buf,len);
+}
+
+ssize_t __dbg_info_set(int pfd, pid_t tid, int type, const void * buf, size_t len)
+{
+ return syscall(SYS_dbg_info_set,pfd,tid,type,buf,len);
+}
+
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 77c8074..e99a83e 100644
--- a/src/arch/nt64/debug.c
+++ b/src/arch/nt64/debug.c
@@ -67,6 +67,16 @@ int __dbg_regs_store(int pfd, pid_t tid, const mcontext_t * regctx)
return syscall(SYS_dbg_regs_store,pfd,tid,regctx);
}
+ssize_t __dbg_info_get(int pfd, pid_t tid, int type, void * buf, size_t len)
+{
+ return syscall(SYS_dbg_info_get,pfd,tid,type,buf,len);
+}
+
+ssize_t __dbg_info_set(int pfd, pid_t tid, int type, const void * buf, size_t len)
+{
+ return syscall(SYS_dbg_info_set,pfd,tid,type,buf,len);
+}
+
int __dbg_suspend_thread(int pfd, pid_t tid)
{
return syscall(SYS_dbg_suspend_thread,pfd,tid);