How can I access the cpu registers of in the current debugged instance? From gdb you can call for example printf "0x%x", $eax
and set $eax_b = $eax
is there also a way to do this via the python support gdb gives? Or should I create a python function which can be call like save-reg "eax" $eax
which on his hand stores the registers in an array where I want them to be stored?
On the other hand, with gdb script you can also set $eax = 1000
for example, this I would also like to do from within a python script, instead of a gdb script.