Files
mercury/tests/debugger/completion.exp2
Ian MacLarty e6d82c9bd4 Added trusted' and untrust' commands. Also allowed individual predicates to
Estimated hours taken: 10
Branches: main

Added `trusted' and `untrust' commands.  Also allowed individual predicates to
be trusted.

browser/declarative_debugger.m
	Exported predicates to add a trusted predicate or function, remove
	a trusted object and return a list of the trusted objects.

browser/declarative_oracle.m
	Changed trusted set so it can also contains individual predicates and
	functions.  Added predicates to add a trusted predicate or function
	to the set, remove a trusted object from the set and return a list
	of the trusted objects.

doc/mdb_categories
	Added dd category.

doc/user_guide.texi
	Documented `untrust' and `trusted' commands.

runtime/mercury_stack_trace.c
runtime/mercury_stack_trace.h
	Added a print_mode argument to MR_print_proc_id_internal, so that
	printing of mode information can be turned on or off.  When a list
	of matching predicates for the trust command is shown then mode
	information is superfluous, since a predicate/function is trusted, not
	a procedure.
	Added MR_print_pred_id to print predicate id - i.e. proc id without
	the mode info.

tests/debugger/completion.exp
	New commands shown in completion list.

tests/debugger/completion.inp
	Added a space, since a --More-- prompt is now displayed when showing
	all the commands.

tests/debugger/mdb_command_test.inp
	untrust and trusted added.

tests/debugger/declarative/trust.exp
tests/debugger/declarative/trust.inp
	Testing of new commands.

trace/mercury_trace_declarative.c
trace/mercury_trace_declarative.h
	Added functions to add a trusted predicate and remove a trusted
	object.  Also added a function to print a list of the trusted objects.
	These all call the predicates exported from declarative_debugger.m.

trace/mercury_trace_internal.c
	Added handlers for `trusted' and `untrust' commands.

trace/mercury_trace_tables.c
trace/mercury_trace_tables.h
	Added a function to filter out only the user predicates and functions
	from a list of procedures.  This filters out uci procs and also
	filters out all procs with a mode number > 0 (thus leaving one proc
	for each predicate/function).  This is used when displaying the
	predicates matching an ambiguous proc-spec with a trust command.

NEWS
	Updated NEWS file.
2004-09-20 04:50:26 +00:00

114 lines
4.3 KiB
Plaintext

1: 1 1 CALL pred completion.main/2-0 (det) completion.m:13
mdb> echo on
echo on
Command echo enabled.
mdb> register --quiet
register --quiet
mdb>
? document maxdepth scroll
P document_category mindepth set
alias down mm_stacks source
all_class_decls e mmc_options stack
all_regs echo modules stack_regs
all_type_ctors enable next step
b exception nondet_stack subgoal
break excp p table
browse f pneg_stack table_io
c finish print term_size
cc_query flag print_optionals trust
class_decl forward printlevel trusted
clear_histogram g proc_stats type_ctor
consumer gen_stack procedures unalias
context goal_paths query unhide_events
continue goto quit untrust
current h r up
cut_stack help register v
d histogram_all retry var_details
dd histogram_exp return var_name_stats
dd_dd ignore s vars
debug_vars io_query save view
delete label_stats save_to_file
disable level scope
mdb> h
h help histogram_all histogram_exp
mdb> help v
var_details var_name_stats vars view
mdb> help va
var_details var_name_stats vars
mdb> help vars
help vars
vars
Prints the names of all the known variables in the current
environment, together with an ordinal number for each variable.
mdb> p --flat
* --pretty -f -v exception
--flat --verbose -p DCG_0 goal
mdb> p --flat DCG_0
p --flat DCG_0
DCG_0 (arg 1) state('<<c_pointer>>')
mdb> sta
stack stack_regs
mdb> stack --detailed
stack --detailed
0 1 1 1 pred completion.main/2-0 (det) (completion.m:13) (empty)
mdb> proc
proc_stats procedures
mdb> procedures complet
completion completion.sub2
completion.sub1 completion.sub2.sub3
mdb> procedures completion.
completion.sub1 completion.sub2 completion.sub2.sub3
mdb> procedures completion.sub1
procedures completion.sub1
List of procedures in module `completion.sub1'
pred completion.sub1.zp/1-0 (det)
func completion.sub1.z1/0-0 (det)
mdb> set --flat format pretty
set --flat format pretty
mdb> unalias excp
unalias excp
Alias `excp' removed.
mdb> b zabc3
b zabc3
0: + stop interface func completion.sub2.sub3.zabc3/0-0 (det)
mdb> b func*complet
func*completion. func*completion.sub2.
func*completion.sub1. func*completion.sub2.sub3.
mdb> b func*completion.z
func*completion.z func*completion.zz
mdb> b func*completion.z
b func*completion.z
1: + stop interface func completion.z/0-0 (det)
mdb> b complet
completion. completion.sub2.
completion.sub1. completion.sub2.sub3.
mdb> b completion.s
completion.sub1. completion.sub2. completion.sub2.sub3.
mdb> b completion.sub1
completion.sub1.z1 completion.sub1.zp
mdb> b completion.sub1.z1
b completion.sub1.z1
2: + stop interface func completion.sub1.z1/0-0 (det)
mdb> b complet
completion. completion.sub2.
completion.sub1. completion.sub2.sub3.
mdb> b completion.s
completion.sub1. completion.sub2. completion.sub2.sub3.
mdb> b completion.sub2
completion.sub2. completion.sub2.sub3.
mdb> b completion.sub2.sub3.zabc3
b completion.sub2.sub3.zabc3
3: + stop interface func completion.sub2.sub3.zabc3/0-0 (det)
mdb> 2d
2d 2debug_vars 2document
2dd 2delete 2document_category
2dd_dd 2disable 2down
mdb> 2de
2debug_vars 2delete
mdb> 2delete
2delete
2: E stop interface func completion.sub1.z1/0-0 (det)
mdb> c
c
ok