[INTERRUPTS] Exception handling

This commit is contained in:
thomas committed 2017-03-27 23:09:07 +02:00
1 parent 0120df249e
commit 5dd42d26ae
11 files changed
+309 -3

No files matched your search

+15
View File
@@ -1,5 +1,6 @@
file sysroot/boot/kernel
target remote localhost:1234
break int_handler_breakpoint
define q
monitor quit
@@ -21,3 +22,17 @@ define reset
monitor system_reset
end
define restore_env
set $name = $arg0
python
registers = ['rax', 'rbx', 'rcx', 'rdx', 'rsi',
'rdi', 'rbp', 'rsp', 'r8', 'r9', 'r10', 'r11',
'r12', 'r13', 'r14', 'r15', 'rip']
values = {}
for r in registers:
values[r] = gdb.parse_and_eval('$name->{}'.format(r))
for r in registers:
gdb.parse_and_eval('${}={}'.format(r, values[r]))
gdb.execute('frame 0')
end