[mercury-users] Debugger question
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Feb 3 16:12:17 AEDT 2001
On 02-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> I've got a program I want to debug that takes its input from stdin.
> I can't find a way of running this program under mdb without feeding
> it the input data by hand.
>
> Would it be possible to add (or does there already exist) an option
> say `--input <file>' to mdb that would do the obvious thing?
You can achieve that using the `--tty' option to mdb.
Create a new virtual terminal or xterm window,
use the `tty' command to figure out the name of the device
for that terminal, run e.g. `sleep 99999' in that tty,
and then on another terminal/window run `mdb --tty /dev/whatever ./myprog'.
$ mdb --help
Name: mdb - Mercury debugger
Usage: mdb [<options>] <executable> [<args>]...
Description:
...
By default, all the output of the debugger and the output of the
program being debugged will be interleaved on the same terminal
window. This can be avoided using the `--tty' or `--window'
options described below.
Options:
-t <file-name>, --tty <file-name>
Redirect all of the I/O for the debugger to the device
specified by <file-name>. The I/O for the program
being debugged will not be redirected.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| 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