Files
mercury/scripts/mdb
Fergus Henderson 006f7902d5 Various changes to make the `--debug' option work.
Estimated hours taken: 2

Various changes to make the `--debug' option work.

compiler/options.m:
	Fix an omission in a previous change of mine:
	add a special_handler for the `--debug' option.

compiler/handle_options.m:
scripts/mgnuc.in:
scripts/ml.in:
	Make the .debug grade imply --use-trail.  The reason for this is
	to avoid unnecessary proliferation in the number of different grades.
	If you're using .debug, you've already taken a major performance
	hit, so you should be able to afford the performance hit caused
	by --use-trail.

configure.in:
	Include a `.tr.debug' grade in LIBGRADES, which holds the set of
	library grades that get installed.

scripts/mdb:
NEWS:
	Update some obsolete documentation referring to the old
	`--generate-trace' option.

NEWS:
	Update some more obsolete documentation listing the commands
	supported by the debugger and describing how to build programs
	with debugging enabled.
1998-07-01 07:41:47 +00:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
#---------------------------------------------------------------------------#
# Copyright (C) 1998 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
#
# IMPORTANT: the manpage is produced automatically from this help
# message, so if you change the help message, don't forget to check
# that the manpage still looks OK.
Help="\
Name: mdb - Mercury debugger
Usage: mdb <executable> [<options>]...
Description:
The arguments of this command form a command line.
If the executable named by this command line is a Mercury program
compiled with debugging enabled (e.g. via the \`--debug' option),
or if it invokes such a program, then mdb will cause the program
to be executed under the supervision of the Mercury internal debugger.
Otherwise, mdb will execute the command line as if the mdb prefix
weren't there.
Environment variables:
MERCURY_OPTIONS.
"
case $# in
0) echo "Usage: mdb <executable> [<arg> ...]" 1>&2
exit 1;;
esac
case $1 in
--help)
echo "$Help"
exit 0;;
esac
MERCURY_OPTIONS="$MERCURY_OPTIONS -Di"
export MERCURY_OPTIONS
exec "$@"