summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-09-05 02:31:09 +0000
committermidipix <writeonce@midipix.org>2019-09-05 02:31:09 +0000
commitbb1628f262d5351d0b29f41b097952a4ed669c8e (patch)
treed79060ad3ea593a380f6af96a11309f0ef5f3679
parentb86e924596b4da8a80f82e93a745921d16eb957c (diff)
downloadmmglue-bb1628f262d5351d0b29f41b097952a4ed669c8e.tar.bz2
mmglue-bb1628f262d5351d0b29f41b097952a4ed669c8e.tar.xz
glue layer: debug.h, __dbg_spawn(): added struct __strace definition/parameter.
-rw-r--r--include/sys/debug.h13
-rw-r--r--src/arch/nt32/debug.c6
-rw-r--r--src/arch/nt64/debug.c6
3 files changed, 20 insertions, 5 deletions
diff --git a/include/sys/debug.h b/include/sys/debug.h
index 908ac2b..d3b73e6 100644
--- a/include/sys/debug.h
+++ b/include/sys/debug.h
@@ -64,6 +64,17 @@ enum __dbg_state {
#define __DBG_EXCEPTION_SOURCE_KERNEL 0x04
#define __DBG_EXCEPTION_SOURCE_USER 0x08
+/* strace,ldso */
+struct __strace {
+ size_t size;
+ const char * loader;
+ int fdlog;
+ uint32_t flags;
+ uint32_t sysmask[16];
+ uint32_t dbgmask[16];
+ uint32_t osmask [32];
+};
+
/* exception record */
struct __erec {
uint32_t exception_code;
@@ -137,7 +148,7 @@ int __dbg_attach(pid_t);
int __dbg_detach(int);
/* process creation/suspension/termination --> debug file descriptor */
-int __dbg_spawn(const char *, char **, char **);
+int __dbg_spawn(const char *, char **, char **, const struct __strace *);
int __dbg_fork(void);
int __dbg_suspend(int);
int __dbg_kill(int);
diff --git a/src/arch/nt32/debug.c b/src/arch/nt32/debug.c
index 6038cc7..a7b0a21 100644
--- a/src/arch/nt32/debug.c
+++ b/src/arch/nt32/debug.c
@@ -15,9 +15,11 @@ int __dbg_detach(int pfd)
return syscall(SYS_dbg_detach,pfd);
}
-int __dbg_spawn(const char * path, char ** argv, char ** envp)
+int __dbg_spawn(const char * path,
+ char ** argv, char ** envp,
+ const struct __strace * strace)
{
- return syscall(SYS_dbg_spawn,path,argv,envp);
+ return syscall(SYS_dbg_spawn,path,argv,envp,strace);
}
int __dbg_fork()
diff --git a/src/arch/nt64/debug.c b/src/arch/nt64/debug.c
index 6038cc7..a7b0a21 100644
--- a/src/arch/nt64/debug.c
+++ b/src/arch/nt64/debug.c
@@ -15,9 +15,11 @@ int __dbg_detach(int pfd)
return syscall(SYS_dbg_detach,pfd);
}
-int __dbg_spawn(const char * path, char ** argv, char ** envp)
+int __dbg_spawn(const char * path,
+ char ** argv, char ** envp,
+ const struct __strace * strace)
{
- return syscall(SYS_dbg_spawn,path,argv,envp);
+ return syscall(SYS_dbg_spawn,path,argv,envp,strace);
}
int __dbg_fork()