Files
mercury/tests/debugger/lval_desc_array.exp
Zoltan Somogyi 0d6c3c9fdf Satisfy a request by Peter Ross: give mdb users the ability to specify
Estimated hours taken: 8
Branches: main

Satisfy a request by Peter Ross: give mdb users the ability to specify
exactly which events inside a procedure they want to put breakpoints on.
Amongst other things, this can make checking postconditions easier:
you can now put a conditional breakpoint on only the exit event.

runtime/mercury_stack_layout.h:
	Add to the exec trace part of proc layouts fields describing an array
	of the label layouts describing the events of the procedure. This is
	the most direct way to implement the new functionality. (In theory,
	we could search the data structures that map file names and line
	numbers to label layouts, but that would be complex, inefficient,
	and *error prone*.)

	To make room for the new fields, and to prepare for making the
	procedure body available to the deep profiler as well (which could
	use it to map execution frequencies of calls back to their location
	in the procedure body, and thus to things like the frequencies with
	which various switch arms are selected), move the procedure body
	of the execution-trace-specific part of the proc layout, and to
	where the deep profiler could in the future also get at it.

runtime/mercury_goto.h:
	Add macros for declaring more than one label layout structure at a
	time.

compiler/layout.m:
	Implement the changes in mercury_stack_layout.h in the compiler's
	data structures as well.

compiler/stack_layout.m:
	Conform to the changes in mercury_stack_layout.h.

	Turn some tuples into named types.

compiler/layout_out.m:
	Conform to the changes in mercury_stack_layout.h.

	Add a mechanism to declare the label layouts in the new array before
	referring to them, by generalizing some existing code. Make this code
	require that the label layouts we refer to via the macros in
	mercury_goto.h match the declarations generated by those macros,
	i.e. that they have information about variables (if debugging is
	enabled, they will).

compiler/opt_debug.m:
	Conform to the change to layout.m.

compiler/prog_rep.m:
	Make a predicate name more expressive.

trace/mercury_trace_cmd_breakpoint.c:
	Implement the new way of using the "break" command, which is
	to add a port name after the procedure specification.

	Register procedures at the start of the function implementing
	the "break" command, instead of "on demand", since all alternatives
	eventually do demand it.

	Write ambiguity reports wholly to mdb's stdout, instead of partially to
	stderr and partially to stdout.

trace/mercury_trace_spy.c:
	Print the port and the goal path for breakpoints on specific events.

	Make the invocation conditions left-aligned, not right-aligned.

doc/user_guide.texi:
	Document the new way of using the "break" command.

NEWS:
	Announce the new capability.

tests/queens.{inp,exp,exp2}:
	Add tests of the new capability.

tests/breakpoints.{exp,exp}:
tests/lval_desc_array.{exp,exp2}:
	Expect the new alignment of invocation conditions.
2007-06-12 06:06:35 +00:00

126 lines
4.1 KiB
Plaintext

1: 1 1 CALL pred lval_desc_array.main/2-0 (det) lval_desc_array.m:17
mdb> echo on
Command echo enabled.
mdb> context none
Contexts will not be printed.
mdb> register --quiet
mdb> break -E 107 -e lval_desc_array__increment
0: + stop entry pred lval_desc_array.increment/2-0 (det)
(ignore next 107 call events)
mdb> continue
217: 110 3 CALL pred lval_desc_array.increment/2-0 (det)
mdb> up
Ancestor level set to 1:
1 pred lval_desc_array.perform_increments/2-0 (det)
mdb> print *
DCG_0 (arg 1) 0
DCG_1 1
DCG_2 2
DCG_3 3
DCG_4 4
DCG_5 5
DCG_6 6
DCG_7 7
DCG_8 8
DCG_9 9
DCG_10 10
DCG_11 11
DCG_12 12
DCG_13 13
DCG_14 14
DCG_15 15
DCG_16 16
DCG_17 17
DCG_18 18
DCG_19 19
DCG_20 20
DCG_21 21
DCG_22 22
DCG_23 23
DCG_24 24
DCG_25 25
DCG_26 26
DCG_27 27
DCG_28 28
DCG_29 29
DCG_30 30
DCG_31 31
DCG_32 32
DCG_33 33
DCG_34 34
DCG_35 35
DCG_36 36
DCG_37 37
DCG_38 38
DCG_39 39
DCG_40 40
DCG_41 41
DCG_42 42
DCG_43 43
DCG_44 44
DCG_45 45
DCG_46 46
DCG_47 47
DCG_48 48
DCG_49 49
DCG_50 50
DCG_51 51
DCG_52 52
DCG_53 53
DCG_54 54
DCG_55 55
DCG_56 56
DCG_57 57
DCG_58 58
DCG_59 59
DCG_60 60
DCG_61 61
DCG_62 62
DCG_63 63
DCG_64 64
DCG_65 65
DCG_66 66
DCG_67 67
DCG_68 68
DCG_69 69
DCG_70 70
DCG_71 71
DCG_72 72
DCG_73 73
DCG_74 74
DCG_75 75
DCG_76 76
DCG_77 77
DCG_78 78
DCG_79 79
DCG_80 80
DCG_81 81
DCG_82 82
DCG_83 83
DCG_84 84
DCG_85 85
DCG_86 86
DCG_87 87
DCG_88 88
DCG_89 89
DCG_90 90
DCG_91 91
DCG_92 92
DCG_93 93
DCG_94 94
DCG_95 95
DCG_96 96
DCG_97 97
DCG_98 98
DCG_99 99
DCG_100 100
DCG_101 101
DCG_102 102
DCG_103 103
DCG_104 104
DCG_105 105
DCG_106 106
DCG_107 107
mdb> continue
108