Re: Changing the EAX register with Python

2010-11-19 Thread Grant Edwards
On 2010-11-19, Tim Roberts wrote: > dutche wrote: >> 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. > You will need to find a Linux applic

Re: Changing the EAX register with Python

2010-11-19 Thread Robert Kern
On 11/19/10 7:08 AM, dutche wrote: Well, I think using ptrace is really the best way, at least what I have found on Google told me that. You may also want to look into pinktrace for another wrapper around ptrace. I haven't used it myself, but it's worth looking into. http://dev.exherbo.org

Re: Changing the EAX register with Python

2010-11-19 Thread dutche
Well, I think using ptrace is really the best way, at least what I have found on Google told me that. Stefan, your answer will fit perfectlly for me, it was what I'm searching. Thank you On Nov 19, 10:43 am, David Cournapeau wrote: > On Fri, Nov 19, 2010 at 4:17 PM, Tim Roberts wrote: > > dutc

Re: Changing the EAX register with Python

2010-11-19 Thread David Cournapeau
On Fri, Nov 19, 2010 at 4:17 PM, Tim Roberts wrote: > dutche 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

Re: Changing the EAX register with Python

2010-11-19 Thread Stefan Sonnenberg-Carstens
Hi, just read my mail :-) You can just build an debugger in python yourself. The script I posted should give you an idea. Am Fr, 19.11.2010, 08:17 schrieb Tim Roberts: > dutche wrote: >> >>Hi folks, I have a unusual question here. >> >>How can I change the value of EAX register under python under

Re: Changing the EAX register with Python

2010-11-18 Thread Tim Roberts
dutche 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

Re: Changing the EAX register with Python

2010-11-18 Thread Dan Stromberg
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

Re: Changing the EAX register with Python

2010-11-18 Thread Stefan Sonnenberg-Carstens
Am 18.11.2010 21:20, schrieb dutche: 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 t

Changing the EAX register with Python

2010-11-18 Thread dutche
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 registe