updated diff for trace-based primitive debugger

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 3 18:30:52 AEDT 1998


On 02-Feb-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> Use stack layout tables to transmit information to the tracer, to allow
> the tracer to print the names and values of variables at CALL and EXIT ports.
> Extend stack layout tables to permit this.
...
> --- mercury_trace.c	1998/01/25 08:22:49	1.5
> +++ mercury_trace.c	1998/02/02 06:18:01
> @@ -184,83 +192,334 @@
>  			fatal_error("MR_trace_display called with inappropriate port");

Please stick to < 80 columns.

> +					fprintf(stderr, "cannot jump from this port\n");

Ditto.

> +			case 'p':
> +				if (port == MR_PORT_CALL) {
> +					MR_trace_browse((int) layout->MR_stack_layout_in_arg_count, &layout->MR_stack_layout_in_arg_info);
> +				} else if (port == MR_PORT_EXIT) {
> +					MR_trace_browse((int) layout->MR_stack_layout_out_arg_count, &layout->MR_stack_layout_out_arg_info);
> +				} else {
> +					fprintf(stderr, "cannot print from this port\n");

Ditto.  Ah, the wonders of long field names ;-)

> +				if (port_is_final(port)) {
> +					fprintf(stderr, "cannot skip from this port\n");

Ditto.

> +				fprintf(stderr, "are you sure you want to abort? ");

Ditto.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list