diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
commit | 07a73aea7acbf0d9f9182bc3557583aa17af0000 (patch) | |
tree | 983e7b70b4d836c4050b8f350d7bd1e7250058b4 /Source/Kernel/Core | |
parent | a804601188be682ce87e6a9591286e8c8ab2817d (diff) | |
download | Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.tar.gz Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.zip |
[not really working] Started work on OStream
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r-- | Source/Kernel/Core/Sys.ns.cpp | 4 | ||||
-rw-r--r-- | Source/Kernel/Core/Sys.ns.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/Kernel/Core/Sys.ns.cpp b/Source/Kernel/Core/Sys.ns.cpp index c5af3e8..59da244 100644 --- a/Source/Kernel/Core/Sys.ns.cpp +++ b/Source/Kernel/Core/Sys.ns.cpp @@ -85,9 +85,9 @@ void dumpRegs(registers_t *regs, VirtualTerminal& vt) { vt << "eflags=" << (u32int)regs->eflags << ", useresp=" << (u32int)regs->useresp << ", ss=" << (u32int)regs->ss << "\n"; } -void stackTrace(u32int ebp, VirtualTerminal& vt, u32int maxframes) { +void stackTrace(u32int ebp, VirtualTerminal& vt, u32int maxframes, bool isUser) { u32int *stack = (u32int*)ebp; - for (u32int i = 0; i < maxframes and (u32int)stack > 0xC0000000 and (u32int)stack < (ebp + 0x10000); i++) { + for (u32int i = 0; i < maxframes and (isUser or ((u32int)stack > 0xC0000000)) and (u32int)stack < (ebp + 0x10000); i++) { vt << "Frame: " << (u32int)stack << " n:" << stack[0] << " r:" << stack[1] << "\n"; stack = (u32int*)stack[0]; } diff --git a/Source/Kernel/Core/Sys.ns.h b/Source/Kernel/Core/Sys.ns.h index 26f04e6..f386135 100644 --- a/Source/Kernel/Core/Sys.ns.h +++ b/Source/Kernel/Core/Sys.ns.h @@ -30,7 +30,7 @@ namespace Sys { u8int inb(u16int port); u16int inw(u16int port); void dumpRegs(registers_t *regs, VirtualTerminal& vt); - void stackTrace(u32int ebp, VirtualTerminal& vt, u32int maxframes); + void stackTrace(u32int ebp, VirtualTerminal& vt, u32int maxframes, bool isUser = false); void panic(char* message, char *file, u32int line); void panic(char* message, registers_t *regs, char *file, u32int line); void panic_assert(char* file, u32int line, char *desc); |