dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing Expect/Dejagnu commands question


From: Daniel Jacobowitz
Subject: Re: Mixing Expect/Dejagnu commands question
Date: Mon, 7 Feb 2005 11:53:49 -0500
User-agent: Mutt/1.5.5.1+cvs20040105i

On Mon, Feb 07, 2005 at 11:39:18AM -0500, Bob Rossi wrote:
> Once I do that, I send a command to GDB with 'remote_send'. I then get
> the output with 'remote_expect'. All of this probably sounds typical to
> you. The part that is not typical is when I need to set 'spawn_id' and call
> 'expect' to read the output of the inferior process. See below,
> 
>    remote_send "send_string"
>    remote_expect "expected string"
> 
>    # change to the 'spawn -pty' process, and read the output
>    set spawn_id $tty_id_from_spawn_pty
>    expect -re "inferior output regex"
>    unset spawn_id
> 
> This allows me to read the output from both GDB and the inferior
> process, in two distinct streams. 
> 
> After all of this, my question is, will setting the 'spawn_id' variable
> and calling 'spawn' and 'expect' somehow corrupt the internals of
> dejagnu's remote_* functions? Or is this a safe thing to do?

Can't you use expect -i $tty_id_from_spawn_pty instead?

-- 
Daniel Jacobowitz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]