From be0101c7ade8457bcf96c6eb33948ee81bfd31b4 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 20 Aug 2019 14:33:36 +0000 Subject: nt32/nt64: debug interfaces: use the newly introduced system calls. --- src/arch/nt32/debug.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'src/arch/nt32') 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 #include #include -#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); } -- cgit v1.2.3