Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: fpga <mgbg25171@blueyonder.co.uk>
To: gdb@sourceware.org
Subject: Re: controlling gdb via python's pexpect
Date: Fri, 06 Nov 2009 11:07:00 -0000	[thread overview]
Message-ID: <26229834.post@talk.nabble.com> (raw)
In-Reply-To: <87ocnghrqv.fsf@j228-gm.comp.glam.ac.uk>




Gaius Mulley wrote:
> 
> George Russell <george@codeplay.com> writes:
> 
>> 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
> 
> Hi,
> 
> for what it is worth feel free to download 
> http://floppsie.comp.glam.ac.uk/download/python/twingdb.tar.gz
> 
> which was written to run two gdb's debugging a stage1 and stage2
> generation of a compiler and single step until a line number differs.
> It is written in Python and uses pexpect
> 
> The code is very alpha - but it worked well enough to find the bug I
> was hunting.
> 
> regards,
> Gaius
> 
> 

Hi Gaius
I'd like to download this but get
The requested URL /download/python/twingdb.tar.gz was not found on this
server.

-- 
View this message in context: http://old.nabble.com/controlling-gdb-via-python%27s-pexpect-tp26221261p26229834.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


  parent reply	other threads:[~2009-11-06 10:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05 20:27 fpga
2009-11-05 20:35 ` George Russell
2009-11-06 10:56   ` Gaius Mulley
2009-11-06 10:56     ` Gaius Mulley
2009-11-06 11:07     ` fpga [this message]
2009-11-06 16:55       ` Gaius Mulley
2009-11-06 17:57         ` fpga
2009-11-06  9:11 ` fpga
2009-11-06  7:15   ` fpga
2009-11-06  9:12   ` fpga
2009-11-06 10:23   ` fpga
2009-11-06 10:28   ` George Russell
2009-11-06 10:39   ` Greg Law
2009-11-06 10:44 ` fpga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26229834.post@talk.nabble.com \
    --to=mgbg25171@blueyonder.co.uk \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox