This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: pexpect doesnt seem able to control bochs like it does gdb???
- From: Gaius Mulley <gaius at glam dot ac dot uk>
- To: fpga <mgbg25171 at blueyonder dot co dot uk>
- Cc: gdb at sourceware dot org
- Date: Thu, 26 Nov 2009 17:15:48 +0000
- Subject: Re: pexpect doesnt seem able to control bochs like it does gdb???
- References: <26531395.post@talk.nabble.com>
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