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: pexpect doesnt seem able to control bochs like it does gdb???


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


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