mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
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:
@@ -143,8 +143,9 @@ scheduler::load_process(const char *name, const void *data, size_t size)
|
||||
// Create a one-page kernel stack space
|
||||
void *stack0 = proc->setup_kernel_stack(stack_size, 0);
|
||||
|
||||
// Stack grows down, point to the end
|
||||
void *sp0 = kutil::offset_pointer(stack0, stack_size);
|
||||
// Stack grows down, point to the end, resere space for initial null frame
|
||||
static const size_t null_frame = sizeof(uint64_t);
|
||||
void *sp0 = kutil::offset_pointer(stack0, stack_size - null_frame);
|
||||
|
||||
cpu_state *state = reinterpret_cast<cpu_state *>(sp0) - 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user