pexpect doesnt seem able to control bochs like it does gdb???
Gaius Mulley
gaius@glam.ac.uk
Thu Nov 26 21:35:00 GMT 2009
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
More information about the Gdb
mailing list