print HEADER "
#define NUM_SYSCALLS ",$i,"
#define SYS_DEBUG 0x100
+#define SYS_DEBUGHEX 0x101
#if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
static const char *cSYSCALL_NAMES[] = {
#define NUM_SYSCALLS 88
#define SYS_DEBUG 0x100
+#define SYS_DEBUGHEX 0x101
#if !defined(__ASSEMBLER__) && !defined(NO_SYSCALL_STRS)
static const char *cSYSCALL_NAMES[] = {
Regs->Arg2, Regs->Arg3, Regs->Arg4, Regs->Arg5, Regs->Arg6);
LogF("\r\n");
break;
+ case SYS_DEBUGHEX:
+ CHECK_STR_NONULL( (char*)Regs->Arg1 );
+ CHECK_NUM_NONULL( (void*)Regs->Arg2, Regs->Arg3 );
+ Debug_HexDump( (const char*)Regs->Arg1, (void*)Regs->Arg2, Regs->Arg3 );
+ break;
//#endif
// -- Default (Return Error)
SYSCALL6(_ZN4_sys5debugEPKcz, 0x100)
SYSCALL6(_SysDebug, 0x100)
+SYSCALL2(_SysDebugHex, 0x101)
+
SYSCALL1(_SysGetPhys, SYS_GETPHYS) // uint64_t _SysGetPhys(uint addr)
SYSCALL1(_SysAllocate, SYS_ALLOCATE) // uint64_t _SysAllocate(uint addr)
SYSCALL3(_SysSetMemFlags, SYS_SETFLAGS) // uint32_t SysSetMemFlags(uint addr, uint flags, uint mask)
if( ELF32_ST_BIND(sym->st_info) == STB_WEAK )
{
WARNING("TODO: Weak bound local symbols '%s'", name);
- assert(ELF32_ST_BIND(sym->st_info) != STB_WEAK);
- return NULL;
+ //assert(ELF32_ST_BIND(sym->st_info) != STB_WEAK);
+ //return NULL;
}
TRACE("Sym %i'%s' %p += 0x%x", i, name, sym->st_value, iBaseDiff);
sym->st_value += iBaseDiff;
{
// Handled previously
// TODO: What about weak locally-defined symbols?
- assert( ELF32_ST_BIND(sym->st_info) != STB_WEAK );
+ //assert( ELF32_ST_BIND(sym->st_info) != STB_WEAK );
}
}
if( fail ) {
// === FUNCTIONS ===
extern void _SysDebug(const char *format, ...);
+extern void _SysDebugHex(const char *Label, const void *Data, size_t Size);
// --- Proc ---
extern void _exit(int status) __attribute__((noreturn));
extern int _SysKill(int pid, int sig);