Syscalls - Work on removing SysDebug (formatted), replacement takes just a string
authorJohn Hodge <[email protected]>
Mon, 25 Aug 2014 04:58:39 +0000 (12:58 +0800)
committerJohn Hodge <[email protected]>
Mon, 25 Aug 2014 04:58:39 +0000 (12:58 +0800)
KernelLand/Kernel/GenSyscalls.pl
KernelLand/Kernel/include/syscalls.h
KernelLand/Kernel/syscalls.c
Usermode/Libraries/ld-acess.so_src/arch/syscalls.s.h

index 442921f..e7e3cbe 100755 (executable)
@@ -46,8 +46,9 @@ foreach my $call (@calls)
 }
 print HEADER "
 #define NUM_SYSCALLS   ",$i,"
-#define SYS_DEBUG      0x100
-#define SYS_DEBUGHEX   0x101
+#define SYS_DEBUGS     0x100
+#define SYS_DEBUGF     0x101
+#define SYS_DEBUGHEX   0x102
 
 #if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
 static const char *cSYSCALL_NAMES[] = {
index 0ad4413..9c68195 100644 (file)
@@ -78,8 +78,9 @@
 #define SYS_UNMARSHALFD        94      // Accept a marshaled FD
 
 #define NUM_SYSCALLS   95
-#define SYS_DEBUG      0x100
-#define SYS_DEBUGHEX   0x101
+#define SYS_DEBUGS     0x100
+#define SYS_DEBUGF     0x101
+#define SYS_DEBUGHEX   0x102
 
 #if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
 static const char *cSYSCALL_NAMES[] = {
index 5f52e0e..7b4855c 100644 (file)
@@ -444,7 +444,11 @@ void SyscallHandler(tSyscallRegs *Regs)
 
        // -- Debug
        //#if DEBUG_BUILD
-       case SYS_DEBUG:
+       case SYS_DEBUGS:
+               CHECK_STR_NONULL( (char*)Regs->Arg1 );
+               Log("Log: %08lli [%i] %s", now(), Threads_GetTID(), (const char*)Regs->Arg1);
+               break;
+       case SYS_DEBUGF:
                CHECK_STR_NONULL( (char*)Regs->Arg1 );
                LogF("Log: %08lli [%i] ", now(), Threads_GetTID());
                LogF((const char*)Regs->Arg1,
index c783a9b..1b9c3e8 100644 (file)
@@ -37,9 +37,10 @@ SYSCALL1(_SysSetFaultHandler, SYS_SETFAULTHANDLER)
 
 SYSCALL1(_SysLoadModule, SYS_LOADMOD)
 
-SYSCALL6(_ZN4_sys5debugEPKcz, 0x100)
-SYSCALL6(_SysDebug, 0x100)
-SYSCALL3(_SysDebugHex, 0x101)
+SYSCALL6(_ZN4_sys5debugEPKcz, SYS_DEBUGF)
+SYSCALL6(_SysDebug, SYS_DEBUGF)
+//SYSCALL3(_SysDebugS, SYS_DEBUGS)
+SYSCALL3(_SysDebugHex, SYS_DEBUGHEX)
 
 SYSCALL1(_SysGetPhys, SYS_GETPHYS)     // uint64_t _SysGetPhys(uint addr)
 SYSCALL1(_SysAllocate, SYS_ALLOCATE)   // uint64_t _SysAllocate(uint addr)

UCC git Repository :: git.ucc.asn.au