Here's -a- way to try - not necessarily the best way:
1) Write a little gcc .c with inline assembler, to make your EAX change
2) Call it from CPython using ctypes

However, by the time you return from the code that makes your change and
resume execution in the CPython interpreter, EAX may well have been changed
to something new.  Accumulators don't often hold the same value for very
long.

On Thu, Nov 18, 2010 at 12:20 PM, dutche <dut...@gmail.com> 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.
>
> Any ideas?
>
> Thank you
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to