mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix kernel thread frame pointer base case.
This commit is contained in:
parent
5ad26d68a3
commit
a685a9d68f
2 changed files with 4 additions and 2 deletions
|
@ -89,7 +89,8 @@ namespace Sortix
|
|||
// the entry function returns. Note that since we use a register based
|
||||
// calling convention, we call BootstrapKernelThread directly.
|
||||
regs->rip = (addr_t) BootstrapKernelThread;
|
||||
regs->userrsp = stack + stacksize;
|
||||
regs->userrsp = stack + stacksize - sizeof(size_t);
|
||||
*((size_t*) regs->userrsp) = 0; /* back tracing stops at NULL rip */
|
||||
regs->rax = 0;
|
||||
regs->rbx = 0;
|
||||
regs->rcx = 0;
|
||||
|
|
|
@ -76,7 +76,8 @@ namespace Sortix
|
|||
// calling convention, we go through a proxy that uses %edi and %esi
|
||||
// as parameters and pushes them to the stack and then does the call.
|
||||
regs->eip = (addr_t) asm_call_BootstrapKernelThread;
|
||||
regs->useresp = stack + stacksize;
|
||||
regs->useresp = stack + stacksize - sizeof(size_t);
|
||||
*((size_t*) regs->useresp) = 0; /* back tracing stops at NULL rip */
|
||||
regs->eax = 0;
|
||||
regs->ebx = 0;
|
||||
regs->ecx = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue