diff options
author | midipix <writeonce@midipix.org> | 2019-08-20 14:33:36 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-08-20 15:00:10 +0000 |
commit | be0101c7ade8457bcf96c6eb33948ee81bfd31b4 (patch) | |
tree | 8b8c4fecec6a611820906fce7c1d098543df2eff /src | |
parent | fbe02e4a5ec620a45e8ab916a21673daf4a6f582 (diff) | |
download | mmglue-be0101c7ade8457bcf96c6eb33948ee81bfd31b4.tar.bz2 mmglue-be0101c7ade8457bcf96c6eb33948ee81bfd31b4.tar.xz |
nt32/nt64: debug interfaces: use the newly introduced system calls.
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/nt32/debug.c | 39 | ||||
-rw-r--r-- | src/arch/nt64/debug.c | 39 |
2 files changed, 36 insertions, 42 deletions
diff --git a/src/arch/nt32/debug.c b/src/arch/nt32/debug.c index cf540e9..6038cc7 100644 --- a/src/arch/nt32/debug.c +++ b/src/arch/nt32/debug.c @@ -3,92 +3,89 @@ #include <signal.h> #include <unistd.h> #include <sys/debug.h> -#include "psxdbg.h" - -extern const struct __dbg_vtbl * __db_vtbl; - +#include "syscall.h" int __dbg_attach(pid_t pid) { - return __db_vtbl->dbg_attach(pid); + return syscall(SYS_dbg_attach,pid); } int __dbg_detach(int pfd) { - return __db_vtbl->dbg_detach(pfd); + return syscall(SYS_dbg_detach,pfd); } int __dbg_spawn(const char * path, char ** argv, char ** envp) { - return __db_vtbl->dbg_spawn(path,argv,envp); + return syscall(SYS_dbg_spawn,path,argv,envp); } int __dbg_fork() { - return __db_vtbl->dbg_fork(); + return syscall(SYS_dbg_fork); } int __dbg_suspend(int pfd) { - return __db_vtbl->dbg_suspend(pfd); + return syscall(SYS_dbg_suspend,pfd); } int __dbg_kill(int pfd) { - return __db_vtbl->dbg_kill(pfd); + return syscall(SYS_dbg_kill,pfd); } int __dbg_rbreak(int pfd) { - return __db_vtbl->dbg_rbreak(pfd); + return syscall(SYS_dbg_rbreak,pfd); } int __dbg_tbreak(int pfd) { - return __db_vtbl->dbg_tbreak(pfd); + return syscall(SYS_dbg_tbreak,pfd); } int __dbg_lbreak(int pfd) { - return __db_vtbl->dbg_lbreak(pfd); + return syscall(SYS_dbg_lbreak,pfd); } int __dbg_event_query_one(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_query_one(pfd,evt); + return syscall(SYS_dbg_event_query_one,pfd,evt); } int __dbg_event_query_all(int pfd, struct __dbg_event evt[], int nelem) { - return __db_vtbl->dbg_event_query_all(pfd,evt,nelem); + return syscall(SYS_dbg_event_query_all,pfd,evt,nelem); } int __dbg_event_acquire(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_acquire(pfd,evt); + return syscall(SYS_dbg_event_acquire,pfd,evt); } int __dbg_event_respond(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_respond(pfd,evt); + return syscall(SYS_dbg_event_respond,pfd,evt); } int __dbg_query_cpid(int pfd) { - return __db_vtbl->dbg_query_cpid(pfd); + return syscall(SYS_dbg_query_cpid,pfd); } int __dbg_query_syspid(int pfd) { - return __db_vtbl->dbg_query_syspid(pfd); + return syscall(SYS_dbg_query_syspid,pfd); } int __dbg_common_error(void) { - return __db_vtbl->dbg_common_error(); + return syscall(SYS_dbg_common_error); } int __dbg_native_error(void) { - return __db_vtbl->dbg_native_error(); + return syscall(SYS_dbg_native_error); } diff --git a/src/arch/nt64/debug.c b/src/arch/nt64/debug.c index cf540e9..6038cc7 100644 --- a/src/arch/nt64/debug.c +++ b/src/arch/nt64/debug.c @@ -3,92 +3,89 @@ #include <signal.h> #include <unistd.h> #include <sys/debug.h> -#include "psxdbg.h" - -extern const struct __dbg_vtbl * __db_vtbl; - +#include "syscall.h" int __dbg_attach(pid_t pid) { - return __db_vtbl->dbg_attach(pid); + return syscall(SYS_dbg_attach,pid); } int __dbg_detach(int pfd) { - return __db_vtbl->dbg_detach(pfd); + return syscall(SYS_dbg_detach,pfd); } int __dbg_spawn(const char * path, char ** argv, char ** envp) { - return __db_vtbl->dbg_spawn(path,argv,envp); + return syscall(SYS_dbg_spawn,path,argv,envp); } int __dbg_fork() { - return __db_vtbl->dbg_fork(); + return syscall(SYS_dbg_fork); } int __dbg_suspend(int pfd) { - return __db_vtbl->dbg_suspend(pfd); + return syscall(SYS_dbg_suspend,pfd); } int __dbg_kill(int pfd) { - return __db_vtbl->dbg_kill(pfd); + return syscall(SYS_dbg_kill,pfd); } int __dbg_rbreak(int pfd) { - return __db_vtbl->dbg_rbreak(pfd); + return syscall(SYS_dbg_rbreak,pfd); } int __dbg_tbreak(int pfd) { - return __db_vtbl->dbg_tbreak(pfd); + return syscall(SYS_dbg_tbreak,pfd); } int __dbg_lbreak(int pfd) { - return __db_vtbl->dbg_lbreak(pfd); + return syscall(SYS_dbg_lbreak,pfd); } int __dbg_event_query_one(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_query_one(pfd,evt); + return syscall(SYS_dbg_event_query_one,pfd,evt); } int __dbg_event_query_all(int pfd, struct __dbg_event evt[], int nelem) { - return __db_vtbl->dbg_event_query_all(pfd,evt,nelem); + return syscall(SYS_dbg_event_query_all,pfd,evt,nelem); } int __dbg_event_acquire(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_acquire(pfd,evt); + return syscall(SYS_dbg_event_acquire,pfd,evt); } int __dbg_event_respond(int pfd, struct __dbg_event * evt) { - return __db_vtbl->dbg_event_respond(pfd,evt); + return syscall(SYS_dbg_event_respond,pfd,evt); } int __dbg_query_cpid(int pfd) { - return __db_vtbl->dbg_query_cpid(pfd); + return syscall(SYS_dbg_query_cpid,pfd); } int __dbg_query_syspid(int pfd) { - return __db_vtbl->dbg_query_syspid(pfd); + return syscall(SYS_dbg_query_syspid,pfd); } int __dbg_common_error(void) { - return __db_vtbl->dbg_common_error(); + return syscall(SYS_dbg_common_error); } int __dbg_native_error(void) { - return __db_vtbl->dbg_native_error(); + return syscall(SYS_dbg_native_error); } |