Changing the EAX register with Python

Tim Roberts timr at
Fri Nov 19 08:17:00 CET 2010

dutche <dutche at> wrote:
>Hi folks, I have a unusual question here.
>How can I change the value of EAX register under python under Linux??
>As paimei does under Windows.
>My project is to have a python program that loads a C program and sets
>a breakpoint at some address, and then with this breakpoint I change
>the EAX register and then continue the program execution.
>With Windows and paimei I did that, but under Linux I don't know yet.

You will need to find a Linux application equivalent to PaiMei.  Your
question is not "how can I change EAX", your question is "where can I find
a Linux debugger that can be controlled from Python?"

I don't know the answer to that.  gdb is quite powerful, and you can
certainly control it by connecting to its stdin and stdout connections.
Tim Roberts, timr at
Providenza & Boekelheide, Inc.

More information about the Python-list mailing list