diff options
-rw-r--r-- | kernel/drivers/interrupts.c | 4 | ||||
-rw-r--r-- | kernel/features/load.c | 1 | ||||
-rwxr-xr-x | run | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/kernel/drivers/interrupts.c b/kernel/drivers/interrupts.c index 92971e4..5b57e56 100644 --- a/kernel/drivers/interrupts.c +++ b/kernel/drivers/interrupts.c @@ -181,8 +181,8 @@ void isr_panic(struct regs *r) if (proc) { printf("\t-> Exception occurred in %s at addr 0x%x (offset 0x%x)\n", proc->name, r->eip, r->eip - proc->entry); - printf("\t\t-> Process: [entry: %x, kstack: %x, ustack: %x]\n", proc->entry, - proc->stack.kernel, proc->stack.user); + printf("\t\t-> Process: [entry: %x, kstack: %x, esp %x, ustack: %x, uesp %x]\n", + proc->entry, proc->stack.kernel, r->esp, proc->stack.user, r->useresp); proc_exit(proc, r, 1); } else { __asm__ volatile("cli\nhlt"); diff --git a/kernel/features/load.c b/kernel/features/load.c index cbe32ed..d6e387e 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -167,6 +167,7 @@ res elf_load(const char *name, struct proc *proc) proc->stack.user = user_stack + PROC_STACK_SIZE; proc->stack.kernel = kernel_stack + PROC_STACK_SIZE; + proc->regs.esp = proc->stack.kernel; proc->regs.ebp = proc->stack.user; proc->regs.useresp = proc->stack.user; proc->regs.eip = header.entry + rand_off; @@ -26,7 +26,7 @@ no_ask="${2}" # TODO: Support -enable-kvm: GPF?! qemu_with_flags() { network="rtl8139" - qemu-system-i386 -d guest_errors -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@" + qemu-system-i386 -d guest_errors,unimp,pcall -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@" } make_cross() { |