[m-rev.] diff: break up the big function in mercury_trace_internals.c

Simon Taylor stayl at cs.mu.OZ.AU
Sat Apr 6 02:51:54 AEST 2002


On 05-Apr-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> trace/mercury_trace_internal.c:
> 	Break up the big function into 60 smaller functions, one for each
> 	debugger command.

> Index: trace/mercury_trace_internal.c
> ===================================================================
> @@ -1525,9 +1872,22 @@
>  		} else {
>  			MR_trace_usage("browsing", "browse");
>  		}
> -	} else if (MR_streq(words[0], "stack")) {
> +
> +	return KEEP_INTERACTING;
> +}
> +
> +static MR_Next
> +MR_trace_cmd_stack(char **words, int word_count, MR_Trace_Cmd_Info *cmd,
> +	MR_Event_Info *event_info, MR_Event_Details *event_details,
> +	MR_Code **jumpaddr)
> +{
> +	const MR_Label_Layout	*layout;
> +	MR_Word 		*saved_regs;
>  		MR_bool	detailed;
>  
> +	layout = event_info->MR_event_sll;
> +	saved_regs = event_info->MR_saved_regs;
> +
>  		detailed = MR_FALSE;
>  		if (! MR_trace_options_detailed(&detailed,
>  				&words, &word_count, "browsing", "stack"))


Assuming that the formatting here (and elsewhere) is due
to diff's handling of whitespace, this change looks fine.

Simon.
--------------------------------------------------------------------------
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