[mercury-users] mdb and input redirection

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jan 21 20:21:42 AEDT 2002


On 21-Jan-2002, Dave Slutzkin <dave_slutzkin at yahoo.com> wrote:
>  --- David Overton <dmo at cs.mu.OZ.AU> wrote:
> > On Sun, Jan 20, 2002 at 11:13:36AM +1100, Dave Slutzkin wrote:
> > > 
> > > Is there any way to run a program through mdb with stdin redirected? 
> > 
> > Yes it is possible.  You just need to tell mdb where to read the
> > debugger commands from (since you presumable don't want to redirect that
> > to the same place).
> 
> 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'.

If you're using X windows, you can also use
`mdb --window myprogram < inputfile'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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