Breakpoint in int_handler. Function for checking fault in gdb
This commit is contained in:
parent
61bc1221bf
commit
86808bce0d
@ -38,5 +38,7 @@ registers *int_handler(registers *r)
|
|||||||
debug("Unhandled interrupt occurred\n");
|
debug("Unhandled interrupt occurred\n");
|
||||||
debug("Interrupt number: %d Error code: %d\n", r->int_no, r->err_code);
|
debug("Interrupt number: %d Error code: %d\n", r->int_no, r->err_code);
|
||||||
debug_print_registers(r);
|
debug_print_registers(r);
|
||||||
|
|
||||||
|
PANIC("Unhandled interrupt occurred");
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
@ -83,3 +83,17 @@ class Reg(gdb.Command):
|
|||||||
Reg()
|
Reg()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
define restore_env
|
||||||
|
set $name = $arg0
|
||||||
|
python
|
||||||
|
|
||||||
|
registers = {r: gdb.parse_and_eval('$name->' + r) for r in
|
||||||
|
['rax', 'rbx', 'rcx', 'rdx', 'rsi', 'rdi', 'rbp', 'rsp', 'r8', 'r9', 'r10',
|
||||||
|
'r11', 'r12', 'r13', 'r14', 'r15', 'rip']}
|
||||||
|
|
||||||
|
for r in registers.items():
|
||||||
|
gdb.parse_and_eval('$%s=%s' % r)
|
||||||
|
gdb.execute('frame 0')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user