X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2Fsyscalls.c;h=34132c62a67b8fcff968252965992e3a8829f32a;hb=e7a76b0d8a0cc6aa77966509780973a6f8216ef7;hp=c649f28f600cc5c2880c7c6a7de75185acb14bb4;hpb=c7acbe49842c871244d76ce9dd7e4e9e70ec3a97;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/syscalls.c b/AcessNative/ld-acess_src/syscalls.c index c649f28f..34132c62 100644 --- a/AcessNative/ld-acess_src/syscalls.c +++ b/AcessNative/ld-acess_src/syscalls.c @@ -14,15 +14,9 @@ #endif #include "request.h" -#if SYSCALL_TRACE -#define DEBUG(str, x...) Debug(str, x) -#else -#define DEBUG(...) do{}while(0) -#endif - #define assert(cnd) do{ \ if( !(cnd) ) { \ - fprintf(stderr, "%s:%i - assert failed - " #cnd, __FILE__, __LINE__);\ + fprintf(stderr, "%s:%i - assert failed - " #cnd"\n", __FILE__, __LINE__);\ exit(-1); \ } \ }while(0) @@ -249,7 +243,7 @@ uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...) exit(127); } - Debug("req->NParams = %i", req->NParams); + dataPtr = (void*)&req->Params[req->NParams]; assert(req->NParams >= 2); // return assert(req->Params[0].Type == ARG_TYPE_INT64); @@ -286,7 +280,7 @@ uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...) free( req ); free( retPtrs ); - DEBUG(": %i 0x%llx", SyscallID, retValue); + SYSTRACE(": %i 0x%llx", SyscallID, retValue); return retValue; }