mirror of
https://github.com/0Nera/BMOSP.git
synced 2024-11-22 16:41:23 +03:00
Добавлен дамп потоков
This commit is contained in:
parent
1ab27c1a70
commit
8ad4c32272
@ -14,6 +14,8 @@
|
||||
#include <stdint.h>
|
||||
#include <tool.h>
|
||||
|
||||
extern task_t *current_task;
|
||||
|
||||
static inline void idt_load( ) {
|
||||
asm volatile("lidt %0" : : "m"(idtr));
|
||||
}
|
||||
@ -52,7 +54,19 @@ static void exception_handler(struct frame state) {
|
||||
state.err, state.int_number);
|
||||
LOG("\tCR3=%x\n", cr3);
|
||||
|
||||
asm volatile("cli; hlt");
|
||||
mem_dump_memory( );
|
||||
|
||||
LOG("Поток вызвавший исключение: %u, [%s]\n", current_task->id, current_task->id_str);
|
||||
|
||||
task_t *t = current_task->next;
|
||||
|
||||
while (t && t != current_task) {
|
||||
LOG("\tID: %u, [%s]\n", t->id, t->id_str);
|
||||
t = t->next;
|
||||
}
|
||||
|
||||
asm volatile("cli");
|
||||
asm volatile("hlt");
|
||||
}
|
||||
|
||||
void isr_generic(struct frame state) {
|
||||
|
Loading…
Reference in New Issue
Block a user