[mercury-users] mdb and input redirection
Simon Taylor
stayl at cs.mu.OZ.AU
Wed Feb 27 17:06:47 AEDT 2002
On 22-Jan-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 21-Jan-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 21-Jan-2002, Dave Slutzkin <dave_slutzkin at yahoo.com> wrote:
> > > When using gdb you can use the command 'run param1 < input1' - I was thinking
> > > of something like that. This allows you to be fully interactive with the
> > > debugger, but still run the program exactly as you like.
> >
> > You can use `mdb --tty /dev/tty myprogram < inputfile'.
>
> This works.
>
> > If you're using X windows, you can also use
> > `mdb --window myprogram < inputfile'.
>
> This doesn't (although it would be nice if it did).
> With `mdb --window', `inputfile' will be sent to mdb, not
> the program. The program's input comes from the new window.
> The above command gives the error message:
> mdb: standard input stream is not a tty
In recent development snapshots of the Mercury distribution
(http://www.cs.mu.oz.au/research/mercury/download/rotd.html)
the behaviour of `mdb --window' has been changed so that a window
is created for mdb, not the program. The redirection above will
now work. Unfortunately, the code to do this isn't very portable.
If it doesn't work on your system, please let us know.
The old behaviour is still available with `mdb --program-in-window'.
Simon.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list