This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: controlling gdb via python's pexpect


fpga wrote:
Can someone please give me an example of how this is done.
I'm afraid the documentation is not helping me.
Thx
Hi,

I have had some success in controlling GDB (via MI) from python, using the subprocess module and communicating with GDB via pipes. (http://docs.python.org/library/subprocess.html)

The main issue so far is that some applications detect when they are running with pipes instead of a terminal for output, and buffer program output by block rather than line as on a terminal, leading to delays in receiving program output issued via printf, for example, unless it is followed by an explicit fflush call.

(I too would be interested in an example of using pexpect to control GDB)
Cheers,
George Russell


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]