[mercury-users] Debugger question

Thomas Conway conway at cs.mu.OZ.AU
Sat Feb 3 12:17:01 AEDT 2001


On Sat, Feb 03, 2001 at 03:25:52AM EST, Ralph Becket 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.

I've come across this problem many times.
My usual solution is to spend 5-10 minutes adding option parsing and
arranging a -f option to my program so that it can read from a file
instead of stdin (or rather, from stdin by default, and from a file
if specified).

All the same, I agree, it would be nice to be able to do something
like the gdb trick

$ gdb ./buggy_program
....
(gdb) run < input_file
....

Thomas
-- 
  Thomas Conway )O+
 <conway at cs.mu.oz.au>       499 User error! Replace user, and press any key.
--------------------------------------------------------------------------
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