[m-rev.] for review: print lists on breakpoints
Ian MacLarty
maclarty at cs.mu.OZ.AU
Fri Jan 28 13:05:06 AEDT 2005
On Thu, Jan 27, 2005 at 04:07:43PM +1100, Zoltan Somogyi wrote:
> Index: doc/user_guide.texi
> ===================================================================
> @@ -3009,6 +3055,27 @@
> the default is to ignore one call event
> that matches the most recently added breakpoint.
> Reports an error if the most recently added breakpoint has since been deleted.
> + at sp 1
> + at item break_print [-fpv] [-e] [-n] @var{num} @var{print-spec}*
> + at sp 1
> +Adds the specified print list elements (there may be more than one)
> +to the print list of the brakpoint numbered @var{num}.
s/brakpoint/breakpoint/
> Index: trace/mercury_trace.c
> ===================================================================
> @@ -344,7 +345,21 @@
> }
> #endif
>
> - match = MR_event_matches_spy_point(layout, port, &action);
> + {
> + /*
> + ** We ignore the print_list computed here, because we want to
> + ** execute the print list of a matched spy point even if the event
> + ** is the end event of a command. In that case, the code above
I don't understand when an event would be the "end event of a command".
Are you sure this is what you wanted to say here?
> + ** invokes MR_trace_event directly without coming here. We
> + ** therefore invoke MR_event_matches_spy_point in MR_trace_event.
> + ** The invocation here is only to find out if we want to stop.
> + */
> +
> + MR_Spy_Print_List print_list;
> + match = MR_event_matches_spy_point(layout, port, &action,
> + &print_list);
> + }
> +
> if (! match) {
> if (MR_trace_ctrl.MR_trace_print_level == MR_PRINT_LEVEL_ALL) {
> return MR_trace_event(&MR_trace_ctrl, MR_FALSE, layout, port,
> Index: trace/mercury_trace_spy.c
> ===================================================================
> @@ -694,17 +835,20 @@
> break;
>
> case MR_SPY_SPECIFIC:
> - fprintf(err_fp, "mdb: cannot save "
> - "breakpoint on specific "
> - "internal label\n");
> + fprintf(err_fp, "mdb: cannot save breakpoint on "
> + "specific internal label\n");
> break;
>
> default:
> - fprintf(err_fp, "mdb: internal error: "
> - "unknown spy when\n");
> + fprintf(err_fp, "mdb: internal error: unknown spy when\n");
> return MR_TRUE;
> }
>
> + if (point->spy_print_list != NULL) {
> + /* XXX */
What's this XXX for?
> + fprintf(fp, "\n");
> + }
> +
> if (!point->spy_enabled) {
> fprintf(fp, "disable\n");
> }
Ian.
--------------------------------------------------------------------------
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