[m-rev.] for review: .decldebug
Zoltan Somogyi
zs at cs.mu.OZ.AU
Sun Sep 1 15:15:40 AEST 2002
Here is the updated log message and diff.
Zoltan.
Add a new grade component, .decldebug. It is as proposed on mercury-developers,
minus the implications about I/O tabling. Those will come later.
compiler/options.m:
Add a new option, --decl-debug, that switches on declarative debugging.
compiler/trace_params.m:
The procedure that converts strings representing trace levels to trace
levels themselves now has an extra argument, which gives the value of
the --decl-debug option. If set, it raises the minimum trace level,
and turn explicitly specifying trace levels `shallow' and `deep'
into errors (since they are not sufficient for declarative debugging).
compiler/handle_options.m:
Pass the value of the --decl-debug option to trace_params, and handle
the errors that may result. Handle the implications of --decl-debug
and the .decldebug grade component.
compiler/compile_target_code.m:
Define MR_DECL_DEBUG when invoking the C compiler if --decl-debug is
set.
runtime/mercury_conf_param.h:
Document MR_DECL_DEBUG, which is defined iff the grade is a .decldebug
grade.
runtime/mercury_grade.h:
Take MR_DECL_DEBUG into account when computing the grade component
related to debugging.
Update the list of places that need to be modified when adding new
grade components.
doc/user_guide.texi:
Document --decl-debug and the .decldebug grade component.
Document the events used by declarative debugging, since Mark didn't.
Fix some minor unrelated omissions.
scripts/init_grade.sh-subr:
scripts/parse_grade_options.sh-subr:
scripts/final_grade.sh-subr:
scripts/canonical_grade.sh-subr:
scripts/mgnuc.in:
scripts/ml.in:
Add a new shell variable, decl_debug, to represent the value of
MR_DECL_DEBUG, and handle it as appropriate.
tests/debugger/Mmakefile:
Do not execute shallow traced tests in .decldebug grades, since we
don't support shallow tracing in such grades.
Specify --trace decl instead of --trace deep in .decldebug grades
when compiling the other tests, since we don't support --trace deep
in .decldebug grades.
cvs diff: Diffing .
cvs diff: Diffing bench
cvs diff: Diffing bench/progs
cvs diff: Diffing bench/progs/compress
cvs diff: Diffing bench/progs/icfp2000
cvs diff: Diffing bench/progs/icfp2001
cvs diff: Diffing bench/progs/nuc
cvs diff: Diffing bench/progs/ray
cvs diff: Diffing bench/progs/tree234
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/compile_target_code.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/compile_target_code.m,v
retrieving revision 1.22
diff -u -b -r1.22 compile_target_code.m
--- compiler/compile_target_code.m 2002/08/26 04:56:56 1.22
+++ compiler/compile_target_code.m 2002/08/27 01:49:33
@@ -458,6 +458,12 @@
{ string__int_to_string(NumTagBits, NumTagBitsString) },
{ string__append_list(
["-DMR_TAGBITS=", NumTagBitsString, " "], NumTagBitsOpt) },
+ globals__io_lookup_bool_option(decl_debug, DeclDebug),
+ { DeclDebug = yes ->
+ DeclDebugOpt = "-DMR_DECL_DEBUG "
+ ;
+ DeclDebugOpt = ""
+ },
globals__io_lookup_bool_option(require_tracing, RequireTracing),
{ RequireTracing = yes ->
RequireTracingOpt = "-DMR_REQUIRE_TRACING "
@@ -565,7 +571,7 @@
GC_Opt, ProfileCallsOpt, ProfileTimeOpt, ProfileMemoryOpt,
ProfileDeepOpt, PIC_Reg_Opt, TagsOpt, NumTagBitsOpt,
Target_DebugOpt, LL_DebugOpt,
- StackTraceOpt, RequireTracingOpt,
+ DeclDebugOpt, RequireTracingOpt, StackTraceOpt,
UseTrailOpt, ReserveTagOpt, MinimalModelOpt, TypeLayoutOpt,
InlineAllocOpt, WarningOpt, CFLAGS,
" -c ", C_File, " ", NameObjectFile, O_File], Command) },
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.150
diff -u -b -r1.150 handle_options.m
--- compiler/handle_options.m 2002/08/26 04:56:56 1.150
+++ compiler/handle_options.m 2002/08/27 01:49:33
@@ -169,8 +169,8 @@
{ TagsMethod0 = string(TagsMethodStr) },
{ convert_tags_method(TagsMethodStr, TagsMethod) }
->
- { map__lookup(OptionTable,
- fact_table_hash_percent_full, PercentFull) },
+ { map__lookup(OptionTable, fact_table_hash_percent_full,
+ PercentFull) },
(
{ PercentFull = int(Percent) },
{ Percent >= 1 },
@@ -185,12 +185,17 @@
{ map__lookup(OptionTable, trace, Trace) },
{ map__lookup(OptionTable, require_tracing,
RequireTracingOpt) },
+ { map__lookup(OptionTable, decl_debug,
+ DeclDebugOpt) },
(
{ Trace = string(TraceStr) },
{ RequireTracingOpt = bool(RequireTracing) },
+ { DeclDebugOpt = bool(DeclDebug) },
{ convert_trace_level(TraceStr, RequireTracing,
- TraceLevel) }
+ DeclDebug, MaybeTraceLevel) }
->
+ (
+ { MaybeTraceLevel = yes(TraceLevel) },
{ map__lookup(OptionTable, suppress_trace,
Suppress) },
(
@@ -227,8 +232,12 @@
;
{ Error = yes("Invalid argument to option `--suppress-trace'.") }
)
+ ;
+ { MaybeTraceLevel = no },
+ { Error = yes("Specified trace level is not compatible with grade") }
+ )
;
- { Error = yes("Invalid argument to option `--trace'\n\t(must be `minimum', `shallow', `deep', or `default').") }
+ { Error = yes("Invalid argument to option `--trace'\n\t(must be `minimum', `shallow', `deep', `decl', `rep' or `default').") }
)
;
{ Error = yes("Invalid argument to option `--termination-norm'\n\t(must be `simple', `total' or `num-data-elems').") }
@@ -246,7 +255,6 @@
{ Error = yes("Invalid target option (must be `c', `asm', `il', or `java')") }
).
-
:- pred postprocess_options_2(option_table::in, compilation_target::in,
gc_method::in, tags_method::in, termination_norm::in,
trace_level::in, trace_suppress_items::in, maybe(string)::out,
@@ -596,6 +604,10 @@
Error = no
},
+ % --decl-debug is an extension of --debug
+ option_implies(decl_debug, require_tracing, bool(yes)),
+ option_implies(decl_debug, stack_trace, bool(yes)),
+
% The `.debug' grade (i.e. --stack-trace plus --require-tracing)
% implies --use-trail, except with --use-minimal-model, which is
% not compatible with --use-trail.
@@ -1525,12 +1537,18 @@
grade_component_table("picreg", pic, [pic_reg - bool(yes)]).
% Debugging/Tracing components
+grade_component_table("decldebug", trace,
+ [stack_trace - bool(yes), require_tracing - bool(yes),
+ decl_debug - bool(yes)]).
grade_component_table("debug", trace,
- [stack_trace - bool(yes), require_tracing - bool(yes)]).
+ [stack_trace - bool(yes), require_tracing - bool(yes),
+ decl_debug - bool(no)]).
grade_component_table("trace", trace,
- [stack_trace - bool(no), require_tracing - bool(yes)]).
+ [stack_trace - bool(no), require_tracing - bool(yes),
+ decl_debug - bool(no)]).
grade_component_table("strce", trace,
- [stack_trace - bool(yes), require_tracing - bool(no)]).
+ [stack_trace - bool(yes), require_tracing - bool(no),
+ decl_debug - bool(no)]).
:- pred reset_grade_options(option_table, option_table).
:- mode reset_grade_options(in, out) is det.
@@ -1563,6 +1581,7 @@
grade_start_values(pic_reg - bool(no)).
grade_start_values(stack_trace - bool(no)).
grade_start_values(require_tracing - bool(no)).
+grade_start_values(decl_debug - bool(no)).
:- pred split_grade_string(string, list(string)).
:- mode split_grade_string(in, out) is semidet.
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.385
diff -u -b -r1.385 options.m
--- compiler/options.m 2002/08/29 15:05:55 1.385
+++ compiler/options.m 2002/08/30 01:25:23
@@ -175,6 +175,7 @@
; debug
; stack_trace
; require_tracing
+ ; decl_debug
% (b) Profiling
; profiling % profile_time + profile_calls
@@ -750,8 +751,9 @@
% Optional feature compilation model options:
% (a) Debuggging
debug - bool_special,
- require_tracing - bool(no),
stack_trace - bool(no),
+ require_tracing - bool(no),
+ decl_debug - bool(no),
% (b) Profiling
profiling - bool_special,
time_profiling - special,
@@ -1319,6 +1321,7 @@
% not very useful and would probably only confuse people.
% long_option("stack-trace", stack_trace).
% long_option("require-tracing", require_tracing).
+long_option("decl-debug", decl_debug).
% (b) profiling
long_option("profiling", profiling).
long_option("time-profiling", time_profiling).
@@ -2652,6 +2655,12 @@
write_tabbed_lines([
"--debug\t\t\t\t(grade modifier: `.debug')",
"\tEnable Mercury-level debugging.",
+ "\tSee the Debugging chapter of the Mercury User's Guide",
+ "\tfor details.",
+ "\tThis option is not yet supported for the `--high-level-code'",
+ "\tback-ends.",
+ "--decl-debug\t\t\t\t(grade modifier: `.decldebug')",
+ "\tEnable declarative debugging.",
"\tSee the Debugging chapter of the Mercury User's Guide",
"\tfor details.",
"\tThis option is not yet supported for the `--high-level-code'",
Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.10
diff -u -b -r1.10 trace_params.m
--- compiler/trace_params.m 2002/07/30 08:25:12 1.10
+++ compiler/trace_params.m 2002/08/19 11:12:15
@@ -37,13 +37,24 @@
:- import_module hlds__hlds_pred.
:- import_module ll_backend__llds. % XXX for trace_port
-:- import_module bool.
+:- import_module bool, std_util.
:- type trace_level.
:- type trace_suppress_items.
- % The bool should be the setting of the `require_tracing' option.
-:- pred convert_trace_level(string::in, bool::in, trace_level::out) is semidet.
+ % The string should be the value of the --trace-level option;
+ % two bools should be the values of the `--require-tracing' and
+ % `--decl-debug' grade options.
+ %
+ % If the string is an acceptable trace level in the specified kinds of
+ % grades, return yes wrapper around the trace level.
+ %
+ % If the string is an known trace level that happens not to be
+ % acceptable in the specified kinds of grades, return no.
+ %
+ % If the string is not known trace level, fail.
+:- pred convert_trace_level(string::in, bool::in, bool::in,
+ maybe(trace_level)::out) is semidet.
:- pred convert_trace_suppress(string::in, trace_suppress_items::out)
is semidet.
@@ -102,14 +113,18 @@
trace_level_none = none.
-convert_trace_level("minimum", no, none).
-convert_trace_level("minimum", yes, shallow).
-convert_trace_level("shallow", _, shallow).
-convert_trace_level("deep", _, deep).
-convert_trace_level("decl", _, decl).
-convert_trace_level("rep", _, decl_rep).
-convert_trace_level("default", no, none).
-convert_trace_level("default", yes, deep).
+convert_trace_level("minimum", no, no, yes(none)).
+convert_trace_level("minimum", yes, no, yes(shallow)).
+convert_trace_level("minimum", _, yes, yes(decl)).
+convert_trace_level("shallow", _, no, yes(shallow)).
+convert_trace_level("shallow", _, yes, no).
+convert_trace_level("deep", _, no, yes(deep)).
+convert_trace_level("deep", _, yes, no).
+convert_trace_level("decl", _, _, yes(decl)).
+convert_trace_level("rep", _, _, yes(decl_rep)).
+convert_trace_level("default", no, no, yes(none)).
+convert_trace_level("default", yes, no, yes(deep)).
+convert_trace_level("default", _, yes, yes(decl)).
eff_trace_level(PredInfo, ProcInfo, TraceLevel) = EffTraceLevel :-
(
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.324
diff -u -b -r1.324 user_guide.texi
--- doc/user_guide.texi 2002/08/26 05:49:02 1.324
+++ doc/user_guide.texi 2002/08/31 12:13:42
@@ -1171,8 +1171,11 @@
To use the debugger, you must
first compile your program with debugging enabled.
-You can do this by using the @samp{--debug} option to @samp{mmc},
-or by including @samp{GRADEFLAGS = --debug} in your @file{Mmakefile}.
+You can do this by using
+one of the @samp{--debug} and @samp{--decl-debug} options
+when invoking @samp{mmc},
+or by including @samp{GRADEFLAGS = --debug} or @samp{GRADEFLAGS = --decl-debug}
+in your @file{Mmakefile}.
@findex --debug
@example
@@ -1463,11 +1466,19 @@
Each of these internal event types has an associated parameter called a path.
The internal event types are:
+ at cindex cond (trace event)
@cindex then (trace event)
@cindex else (trace event)
@cindex disj (trace event)
@cindex switch (trace event)
+ at cindex neg_enter (trace event)
+ at cindex neg_fail (trace event)
+ at cindex neg_success (trace event)
@table @emph
+ at item cond
+A cond event occurs when execution reaches
+the start of the condition of an if-then-else.
+The path associated with the event specifies which if-then-else this is.
@item then
A then event occurs when execution reaches
the start of the then part of an if-then-else.
@@ -1488,6 +1499,20 @@
with different function symbol).
The path associated with the event specifies
which arm of which switch this is.
+ at item neg_enter
+A neg_enter event occurs when execution reaches
+the start of a negated goal.
+The path associated with the event specifies which negation goal this is.
+ at item neg_fail
+A neg_fail event occurs when
+a goal inside a negation succeeds,
+which means that its negation fails.
+The path associated with the event specifies which negation goal this is.
+ at item neg_success
+A neg_success event occurs when
+a goal inside a negation fails,
+which means that its negation succeeds.
+The path associated with the event specifies which negation goal this is.
@c @item pragma_first
@c @item pragma_later
@end table
@@ -1579,8 +1604,8 @@
The simpler way is to compile a program in a debugging grade,
which you can do directly by specifying a grade
that includes the word ``debug'' (e.g.@: @samp{asm_fast.gc.debug}),
-or indirectly by specifying the @samp{--debug} grade option
-to the compiler, linker, and other tools
+or indirectly by specifying one of the @samp{--debug} or @samp{--decl-debug}
+grade options to the compiler, linker, and other tools
(in particular @code{mmc}, @code{mgnuc}, @code{ml}, and @code{c2init}).
If you follow this way,
and accept the default settings of the various compiler options
@@ -4664,6 +4689,7 @@
@cindex .agc (grade modifier)
@cindex .rt (grade modifier)
@cindex .debug (grade modifier)
+ at cindex .decldebug (grade modifier)
@cindex .par (grade modifier)
@cindex prof (grade modifier)
@cindex memprof (grade modifier)
@@ -4673,6 +4699,7 @@
@cindex agc (grade modifier)
@cindex rt (grade modifier)
@cindex debug (grade modifier)
+ at cindex decldebug (grade modifier)
@cindex par (grade modifier)
@table @asis
@item What target language to use, and (for C) what combination of GNU C extensions to use:
@@ -4686,7 +4713,7 @@
@item What kind of profiling to use:
@samp{prof},
@c @samp{proftime}, @samp{profcalls},
-and @samp{memprof}
+ at samp{memprof}, and @samp{profdeep}
(the default is no profiling).
@item Whether to enable the trail:
@@ -4696,7 +4723,7 @@
@samp{rt} (the default is no reserved tag)
@item What debugging features to enable:
- at samp{debug} (the default is no debugging features).
+ at samp{debug} and @samp{decldebug} (the default is no debugging features).
@item Whether to use a thread-safe version of the runtime environment:
@samp{par} (the default is a non-thread-safe environment).
@@ -4805,6 +4832,9 @@
@item @samp{.debug}
@code{--debug}.
+ at item @samp{.decldebug}
+ at code{--decl-debug}.
+
@end table
@end table
@@ -4930,6 +4960,15 @@
@cindex Debugging
Enables the inclusion in the executable of code and data structures
that allow the program to be debugged with @samp{mdb} (see @ref{Debugging}).
+This option is not yet supported for the @samp{--high-level-code} back-ends.
+
+ at sp 1
+ at item @code{--decl-debug} (grades: any grade containing @samp{.decldebug})
+ at findex --decl-debug
+ at cindex Debugging
+Enables the inclusion in the executable of code and data structures
+that allow the program to be debugged
+with the declarative debugging facilities of @samp{mdb} (see @ref{Debugging}).
This option is not yet supported for the @samp{--high-level-code} back-ends.
@sp 1
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.64
diff -u -b -r1.64 mercury_conf_param.h
--- runtime/mercury_conf_param.h 2002/08/21 11:27:41 1.64
+++ runtime/mercury_conf_param.h 2002/08/22 05:30:26
@@ -149,6 +149,15 @@
** Note that MR_REQUIRE_TRACING is talking about execution tracing,
** not stack tracing; these are two independently configurable features.
**
+** MR_DECL_DEBUG
+** Require that all Mercury procedures linked in should be compiled
+** with a trace level that supports declarative debugging. This effect
+** is achieved by including MR_DECL_DEBUG in the mangled grade
+** (see mercury_grade.h).
+**
+** Setting MR_DECL_DEBUG requires MR_REQUIRE_TRACING and MR_STACK_TRACE
+** to be set also.
+**
** MR_LOWLEVEL_DEBUG
** Enables various low-level debugging stuff,
** that was in the distant past used to debug
Index: runtime/mercury_grade.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_grade.h,v
retrieving revision 1.40
diff -u -b -r1.40 mercury_grade.h
--- runtime/mercury_grade.h 2002/08/21 11:27:42 1.40
+++ runtime/mercury_grade.h 2002/08/22 05:30:27
@@ -256,18 +256,28 @@
** Hence we consider it effectively binary incompatible.
** Similar considerations apply to procedure call tracing.
*/
-#if defined(MR_STACK_TRACE)
+#if defined(MR_DECL_DEBUG)
+ #define MR_GRADE_PART_12 MR_PASTE2(MR_GRADE_PART_11, _decldebug)
+ #if ! defined(MR_STACK_TRACE)
+ #error "declarative debugging require stack traces"
+ #endif
+ #if ! defined(MR_REQUIRE_TRACING)
+ #error "declarative debugging require execution tracing"
+ #endif
+#else
+ #if defined(MR_STACK_TRACE)
#if defined(MR_REQUIRE_TRACING)
#define MR_GRADE_PART_12 MR_PASTE2(MR_GRADE_PART_11, _debug)
#else
#define MR_GRADE_PART_12 MR_PASTE2(MR_GRADE_PART_11, _strce)
#endif
-#else
+ #else
#if defined(MR_REQUIRE_TRACING)
#define MR_GRADE_PART_12 MR_PASTE2(MR_GRADE_PART_11, _trace)
#else
#define MR_GRADE_PART_12 MR_GRADE_PART_11
#endif
+ #endif
#endif
#define MR_GRADE MR_GRADE_PART_12
@@ -420,17 +430,21 @@
** Hence we consider it effectively binary incompatible.
** Similar considerations apply to procedure call tracing.
*/
-#if defined(MR_STACK_TRACE)
+#if defined(MR_DECL_DEBUG)
+ #define MR_GRADE_OPT_PART_12 MR_GRADE_OPT_PART_11 ".decldebug"
+#else
+ #if defined(MR_STACK_TRACE)
#if defined(MR_REQUIRE_TRACING)
#define MR_GRADE_OPT_PART_12 MR_GRADE_OPT_PART_11 ".debug"
#else
#define MR_GRADE_OPT_PART_12 MR_GRADE_OPT_PART_11 ".strce"
#endif
-#else
+ #else
#if defined(MR_REQUIRE_TRACING)
#define MR_GRADE_OPT_PART_12 MR_GRADE_OPT_PART_11 ".trace"
#else
#define MR_GRADE_OPT_PART_12 MR_GRADE_OPT_PART_11
+ #endif
#endif
#endif
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
Index: scripts/canonical_grade.sh-subr
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/canonical_grade.sh-subr,v
retrieving revision 1.5
diff -u -b -r1.5 canonical_grade.sh-subr
--- scripts/canonical_grade.sh-subr 2002/08/21 11:27:50 1.5
+++ scripts/canonical_grade.sh-subr 2002/08/22 05:30:34
@@ -108,9 +108,13 @@
# false) ;;
# esac
-case $stack_trace,$require_tracing in
- true,true) GRADE="$GRADE.debug" ;;
- false,true) GRADE="$GRADE.trace" ;;
- true,false) GRADE="$GRADE.strce" ;;
- false,false) ;;
+case $stack_trace,$require_tracing,$decl_debug in
+ true,true,true) GRADE="$GRADE.decldebug" ;;
+ true,true,false) GRADE="$GRADE.debug" ;;
+ false,true,false) GRADE="$GRADE.trace" ;;
+ true,false,false) GRADE="$GRADE.strce" ;;
+ false,false,false) ;;
+ *) echo "$progname: error: invalid combination of debugging options." 1>&2
+ exit 1
+ ;;
esac
Index: scripts/final_grade_options.sh-subr
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/final_grade_options.sh-subr,v
retrieving revision 1.7
diff -u -b -r1.7 final_grade_options.sh-subr
--- scripts/final_grade_options.sh-subr 2001/01/29 01:55:08 1.7
+++ scripts/final_grade_options.sh-subr 2002/08/19 10:37:19
@@ -39,6 +39,15 @@
esac
#
+# --decl-debug implies --debug
+#
+case $decl_debug in true)
+ require_tracing=true
+ stack_trace=true
+ ;;
+esac
+
+#
# --target asm, IL or Java implies --high-level-code
#
case $target in asm|il|java)
Index: scripts/init_grade_options.sh-subr
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/init_grade_options.sh-subr,v
retrieving revision 1.19
diff -u -b -r1.19 init_grade_options.sh-subr
--- scripts/init_grade_options.sh-subr 2002/08/21 11:27:50 1.19
+++ scripts/init_grade_options.sh-subr 2002/08/22 05:30:34
@@ -42,6 +42,7 @@
--pic-reg
--no-stack-trace
--debug
+ --decl-debug
See the documentation in the \"Invocation\" section
of the Mercury User's Guide."
@@ -69,6 +70,7 @@
pic_reg=false
stack_trace=false
require_tracing=false
+decl_debug=false
case $# in
0) set - --grade "$DEFAULT_GRADE" ;;
Index: scripts/mgnuc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mgnuc.in,v
retrieving revision 1.90
diff -u -b -r1.90 mgnuc.in
--- scripts/mgnuc.in 2002/08/21 16:01:37 1.90
+++ scripts/mgnuc.in 2002/08/22 05:30:34
@@ -378,6 +378,11 @@
false) TRACE_OPTS="" ;;
esac
+case $decl_debug in
+ true) DECL_DEBUG_OPTS="-DMR_DECL_DEBUG" ;;
+ false) DECL_DEBUG_OPTS="" ;;
+esac
+
GCC_OPTS="$NEST_OPTS $ASM_OPTS $GOTO_OPTS $REG_OPTS"
# check that special grades are only used with gcc
@@ -531,7 +536,8 @@
ALL_CC_OPTS="$MERC_ALL_C_INCL_DIRS $ANSI_OPTS $CHECK_OPTS $OPT_OPTS \
$HLC_OPTS $HLD_OPTS $GCC_OPTS $GC_OPTS $DEFINE_OPTS \
- $TRACE_OPTS $STACK_TRACE_OPTS $LLDEBUG_OPTS $C_DEBUG_OPTS \
+ $STACK_TRACE_OPTS $TRACE_OPTS $DECL_DEBUG_OPTS \
+ $LLDEBUG_OPTS $C_DEBUG_OPTS \
$PROF_TIME_OPTS $PROF_CALLS_OPTS $PROF_MEMORY_OPTS \
$PROF_DEEP_OPTS $INLINE_ALLOC_OPTS $TRAIL_OPTS \
$RESERVE_TAG_OPTS $MINIMAL_MODEL_OPTS \
Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.97
diff -u -b -r1.97 ml.in
--- scripts/ml.in 2002/08/21 11:27:51 1.97
+++ scripts/ml.in 2002/08/22 05:30:34
@@ -90,7 +90,8 @@
MAYBE_STATIC_OPT=""
-# --require-tracing (which is implied by --debug) implies --trace
+# --require-tracing (which is implied by --debug and by --decl-debug)
+# implies --trace
case $require_tracing in
true) trace=true ;;
false) ;;
Index: scripts/parse_grade_options.sh-subr
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/parse_grade_options.sh-subr,v
retrieving revision 1.24
diff -u -b -r1.24 parse_grade_options.sh-subr
--- scripts/parse_grade_options.sh-subr 2002/08/21 11:27:51 1.24
+++ scripts/parse_grade_options.sh-subr 2002/08/22 05:30:34
@@ -164,6 +164,11 @@
stack_trace=false
require_tracing=false ;;
+ --decl-debug)
+ decl_debug=true ;;
+ --no-decl-debug)
+ decl_debug=false ;;
+
-s|--grade)
shift
grade="$1";
@@ -193,6 +198,7 @@
pic_reg=false
stack_trace=false
require_tracing=false
+ decl_debug=false
grade_pieces=`echo $grade | tr '.' ' '`
for grade_piece in $grade_pieces
@@ -396,6 +402,12 @@
stack_trace=true
require_tracing=true
;;
+ decldebug)
+ stack_trace=true
+ require_tracing=true
+ decl_debug=true
+ ;;
+
*)
echo "$0: unknown grade component" \
"\`$grade_piece'" 1>&2
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
Index: tests/debugger/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
retrieving revision 1.81
diff -u -b -r1.81 Mmakefile
--- tests/debugger/Mmakefile 2002/08/17 13:52:01 1.81
+++ tests/debugger/Mmakefile 2002/08/20 23:42:14
@@ -45,9 +45,10 @@
print_goal \
queens_rep \
resume_typeinfos \
- shallow \
type_desc_test
+SHALLOW_PROGS = \
+ shallow
# Since the `interactive' test case requires the use of shared libraries,
# this means it won't work properly if the static libraries are linked
@@ -92,12 +93,24 @@
endif
endif
+# Declarative debugging grades don't support trace level shallow,
+# so we execute the tests exercising shallow tracing only in grades
+# other than .decldebug grades.
+ifeq "$(findstring decldebug,$(GRADE))" ""
+ PROGS := $(PROGS) $(SHALLOW_PROGS)
+endif
+
SUBDIRS=declarative
TESTS=$(PROGS)
TESTS_DIR=..
include $(TESTS_DIR)/Mmake.common
-MCFLAGS += --trace deep
+# The minimum trace level in .decldebug grades is --trace decl.
+ifneq "$(findstring decldebug,$(GRADE))" ""
+ MCFLAGS += --trace decl
+else
+ MCFLAGS += --trace deep
+endif
MLFLAGS += --trace
# Module-specific options should go in Mercury.options so they
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list