Improve debugging functions

- More sensible stack tracer, in C++ (no symbols yet)
- Was forgetting to add null frame to new kernel stacks
- __kernel_assert was using an old vector
- A GP fault will only print its associated table entry
This commit is contained in:
Justin C. Miller
2019-03-15 00:47:46 -07:00
parent 6410c898c5
commit bf8286d15f
9 changed files with 81 additions and 66 deletions

View File

@@ -8,13 +8,14 @@ __kernel_assert(const char *file, unsigned line, const char *message)
if (cons) {
cons->set_color(9 , 0);
cons->puts("\n\n ERROR: ");
cons->puts(message);
cons->puts("\n ");
cons->puts(file);
cons->puts(":");
cons->put_dec(line);
cons->puts(": ");
cons->puts(message);
cons->puts("\n");
}
__asm__ ( "int $0e7h" );
__asm__ ( "int $0e4h" );
while (1) __asm__ ("hlt");
}