AcessNative - Cleaning up debug
authorJohn Hodge <[email protected]>
Wed, 4 Jul 2012 14:21:41 +0000 (22:21 +0800)
committerJohn Hodge <[email protected]>
Wed, 4 Jul 2012 14:21:41 +0000 (22:21 +0800)
AcessNative/RunTest
AcessNative/acesskernel_src/server.c
AcessNative/acesskernel_src/syscalls.c
AcessNative/acesskernel_src/threads.c
AcessNative/ld-acess_src/binary.c
AcessNative/ld-acess_src/elf_load.c
AcessNative/ld-acess_src/exports.c
AcessNative/ld-acess_src/memory.c

index 3a2a3a2..6ea88b6 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 trap '' 2
-$1 ./AcessKernel --rootapp /Acess/SBin/login
+#$1 ./AcessKernel --rootapp /Acess/SBin/login
+$1 ./AcessKernel --rootapp /Acess/Apps/AxWin/3.0/AxWinWM
 trap 2
 killall ld-acess
index b9b2b19..78f7fa1 100644 (file)
@@ -131,9 +131,11 @@ int Server_WorkerThread(void *ClientPtr)
                while( Client->CurrentRequest == NULL )
                        SDL_CondWait(Client->WaitFlag, Client->Mutex);
                
-               Log_Debug("AcessSrv", "Worker got message %p", Client->CurrentRequest);
+//             Log_Debug("AcessSrv", "Worker got message %p", Client->CurrentRequest);
                
                if(Client->ClientID != cur_client_id) {
+//                     Log_Debug("AcessSrv", "Client thread ID changed from %i to %i",
+//                             cur_client_id, Client->ClientID);
                        Threads_SetThread( Client->ClientID );
                        cur_client_id = Client->ClientID;
                }
@@ -304,8 +306,8 @@ int Server_ListenThread(void *Unused)
                        continue;
                }
                
-               Log_Debug("AcessSrv", "Message from Client %i (%p)",
-                       client->ClientID, client);
+//             Log_Debug("AcessSrv", "Message from Client %i (%p)",
+//                     client->ClientID, client);
 
                // Make a copy of the request data      
                req = malloc(length);
index b945df8..9b9fda4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Syscall Distribution
  */
-#define DEBUG  1
+#define DEBUG  0
 #include <acess.h>
 #include <threads.h>
 #include <events.h>
index 778917c..c390a03 100644 (file)
@@ -97,12 +97,9 @@ void Threads_SetThread(int TID)
 tThread        *Threads_GetThread(Uint TID)
 {
        tThread *thread;
-       Log_Debug("Threads", "Looking for TID %i", TID);
        for( thread = gpThreads; thread; thread = thread->GlobalNext )
        {
                if( thread->TID == TID ) {
-                       Log_Debug("Threads", "Found %p", thread);
-                       Log_Debug("Threads", "- Name = %s", thread->ThreadName);
                        return thread;
                }
        }
index 8d11e97..d04ac6d 100644 (file)
@@ -1,7 +1,11 @@
 /*
- * AcessNative
+ * AcessNative Dynamic Linker
+ * - By John Hodge (thePowersGang)
+ * 
+ * binary.c
+ * - Provides binary loading and type abstraction
  */
-#define DEBUG  1
+#define DEBUG  0
 #include "common.h"
 #include <stdint.h>
 #include <stdio.h>
@@ -110,7 +114,8 @@ void *Binary_LoadLibrary(const char *Name)
        }
 
        ret = Binary_Load(path, (uintptr_t*)&entry);
-       printf("LOADED '%s' to %p (Entry=%p)\n", path, ret, entry);
+       if( ret != (void*)-1 )
+               Debug("LOADED '%s' to %p (Entry=%p)", path, ret, entry);
        free(path);
        
        #if DEBUG
index 8cafc01..909c24a 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  * ELF Executable Loader Code\r
  */\r
-#define DEBUG  1\r
+#define DEBUG  0\r
 #include <stdlib.h>\r
 #include <stdio.h>\r
 #include <string.h>\r
index 957a86e..fc336c8 100644 (file)
@@ -68,7 +68,7 @@ int acess_reopen(int FD, const char *Path, int Flags) {
 size_t acess_read(int FD, void *Dest, size_t Bytes) {
        if(FD & NATIVE_FILE_MASK)
                return native_read(FD & (NATIVE_FILE_MASK-1), Dest, Bytes);
-       if( FD > 2 )
+//     if( FD > 2 )
                DEBUG("read(0x%x, 0x%x, *%p)", FD, Bytes, Dest);
        return _Syscall(SYS_READ, ">i >i <d", FD, Bytes, Bytes, Dest);
 }
@@ -76,7 +76,7 @@ size_t acess_read(int FD, void *Dest, size_t Bytes) {
 size_t acess_write(int FD, const void *Src, size_t Bytes) {
        if(FD & NATIVE_FILE_MASK)
                return native_write(FD & (NATIVE_FILE_MASK-1), Src, Bytes);
-       if( FD > 2 )
+//     if( FD > 2 )
                DEBUG("write(0x%x, 0x%x, %p\"%.*s\")", FD, Bytes, Src, Bytes, (char*)Src);
        return _Syscall(SYS_WRITE, ">i >i >d", FD, Bytes, Bytes, Src);
 }
@@ -287,7 +287,7 @@ void acess__SysDebug(const char *Format, ...)
        
        va_start(args, Format);
        
-       printf("[_SysDebug %i]", giSyscall_ClientID);
+       printf("[_SysDebug %i] ", giSyscall_ClientID);
        vprintf(Format, args);
        printf("\n");
        
index f1147c2..2e9612c 100644 (file)
@@ -53,7 +53,7 @@ uintptr_t FindFreeRange(size_t ByteCount, int MaxBits)
 
        end <<= (sizeof(intptr_t)*8-MaxBits);
        end >>= (sizeof(intptr_t)*8-MaxBits);
-       printf("end = %p\n", (void*)end);
+//     printf("end = %p\n", (void*)end);
        
 //     for( base = 0; base < end - size; base -= PAGE_SIZE )
        for( base = end - size + 1; base > 0; base -= PAGE_SIZE )

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