[m-dev.] trivial diff: fix a bug in the debugger
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Jul 23 10:17:26 AEST 1999
Estimated hours taken: 0.1
trace/mercury_trace_vars.c:
Fix a bug: if you try to print a nonexistent named variable,
return an error message.
tests/debugger/debugger_regs.{inp,exp}:
Test for this fix.
Zoltan.
cvs diff: Diffing .
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/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
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/dynamic_linking
cvs diff: Diffing extras/exceptions
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/odbc
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing profiler
cvs diff: Diffing runtime
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 scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
Index: tests/debugger/debugger_regs.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/debugger_regs.exp,v
retrieving revision 1.7
diff -u -b -r1.7 debugger_regs.exp
--- debugger_regs.exp 1999/05/27 01:01:26 1.7
+++ debugger_regs.exp 1999/07/23 01:55:38
@@ -5,6 +5,8 @@
2: 2 2 CALL pred debugger_regs:data/41-0 (det)
mdb>
3: 2 2 EXIT pred debugger_regs:data/41-0 (det)
+mdb> print NoSuchVar
+mdb: there is such variable.
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
HeadVar__2 "a0"
Index: tests/debugger/debugger_regs.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/debugger_regs.inp,v
retrieving revision 1.3
diff -u -b -r1.3 debugger_regs.inp
--- debugger_regs.inp 1998/10/16 06:19:32 1.3
+++ debugger_regs.inp 1999/07/23 01:51:51
@@ -1,5 +1,6 @@
echo on
+print NoSuchVar
print *
continue
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/hard_coded
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
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
Index: trace/mercury_trace_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_vars.c,v
retrieving revision 1.7
diff -u -b -r1.7 mercury_trace_vars.c
--- mercury_trace_vars.c 1999/06/24 18:10:41 1.7
+++ mercury_trace_vars.c 1999/07/22 23:32:15
@@ -595,6 +595,10 @@
}
}
+ if (!found) {
+ return "there is such variable";
+ }
+
if (MR_point.MR_point_vars[i].MR_var_is_ambiguous) {
if (must_be_unique) {
return "variable name is not unique";
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list