diff options
author | Marvin Borner | 2021-02-25 23:32:18 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-25 23:32:18 +0100 |
commit | dec16faf32e75d613e20cac175b8a0c2d3612b94 (patch) | |
tree | 756d1ce3cf07cfe7da80702d96f9ec9e6585dceb /kernel/features | |
parent | c258de9038d113cafcc8e290f7f70bbc2f1cb50d (diff) |
Added some debugging features
I've tried to track down the bugs with kvm and q35 but I didn't manage
to do it - yet!
I'll probably look into it soon.
Diffstat (limited to 'kernel/features')
-rw-r--r-- | kernel/features/load.c | 1 | ||||
-rw-r--r-- | kernel/features/proc.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c index f79e6b4..9024c82 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -12,6 +12,7 @@ void proc_load(struct proc *proc, void *data) proc->regs.ebp = (u32)stack; proc->regs.useresp = (u32)stack; proc->regs.eip = (u32)data; + proc->entry = (u32)data; } int bin_load(const char *path, struct proc *proc) diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 48bde72..35c0fa7 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -162,6 +162,8 @@ void proc_yield(struct regs *r) void proc_enable_waiting(u32 id, enum proc_wait_type type) { struct proc *proc_bak = proc_current(); + if (!proc_bak) + return; struct node *iterator = proc_list->head; while (iterator) { |