Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Gaius Mulley <gaius@glam.ac.uk>
To: fpga <mgbg25171@blueyonder.co.uk>
Cc: gdb@sourceware.org
Subject: Re: pexpect doesnt seem able to control bochs like it does gdb???
Date: Thu, 26 Nov 2009 21:35:00 -0000	[thread overview]
Message-ID: <871vjljjgb.fsf@j228-gm.comp.glam.ac.uk> (raw)
In-Reply-To: <26531395.post@talk.nabble.com> (fpga's message of "Thu\, 26 Nov 2009 07\:54\:48 -0800 \(PST\)")

fpga <mgbg25171@blueyonder.co.uk> writes:

> I've been controlling qemu with gdb via pexpect.
> I'm now trying to control bochs debugger with pexpect
> [code]
> #!/usr/bin/python
> import pexpect, subprocess, time
> child = pexpect.spawn('terminator -x bochs\n') 
> child.expect_exact   ('Please choose one: [6] ')
> child.send           ('6\n')
> [/code]
>
> Unfortunately bochs debugger ignores the 6 that is sent.
> I just wonder if anyone knows how to get around such "ignorance".
> If it's any help...  
> I note that if I If I press 6 then this works 
> i.e. it's as if I had inserted 'child.interact()' before sending the 6??? 
> Any advice much appreciated

Hi,

I could be very wrong - but it might be worth seeing if changing the code

> child.send           ('6\n')

to

child.sendline('6')

helps..

regards,
Gaius


      parent reply	other threads:[~2009-11-26 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 18:28 fpga
2009-11-26 18:32 ` Joel Brobecker
2009-11-26 21:35 ` Gaius Mulley [this message]

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=871vjljjgb.fsf@j228-gm.comp.glam.ac.uk \
    --to=gaius@glam.ac.uk \
    --cc=gdb@sourceware.org \
    --cc=mgbg25171@blueyonder.co.uk \
    /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