[m-dev.] For review: Add a pred_or_func attribute to the external debugger

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Feb 20 00:45:46 AEDT 1999


On 19-Feb-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> +	if (layout->MR_sll_entry->MR_sle_user.MR_user_pred_or_func 
> +	    == MR_PREDICATE) {
> +		pred_or_func = "pred";
> +	} else {
> +		pred_or_func = "func";
> +	}

Please use our standard conventions for placement of curly braces.
The { should be on a new line if the "if" doesn't fit on a single line.

> @@ -644,12 +655,20 @@
>  	/* XXX get live vars from registers */
>  	Word arguments = /* XXX FIXME!!! */ 0;
>  
> +	if (layout->MR_sll_entry->MR_sle_user.MR_user_pred_or_func 
> +	    == MR_PREDICATE) {
> +		pred_or_func = "pred";
> +	} else {
> +		pred_or_func = "func";
> +	}

Likewise.

> --- fixbug1.4/browser/debugger_interface.m Thu, 18 Feb 1999 22:16:50 +0100 jahier (submitdiff/6_debugger_i 1.6 640)
> +++ fixbug1.4(w)/browser/debugger_interface.m Fri, 19 Feb 1999 13:04:00 +0100 jahier (submitdiff/6_debugger_i 1.6 640)
> @@ -80,6 +80,7 @@
>  			match(call_number),
>  			match(depth_number),
>  			match(trace_port_type),
> +			match(string),		% "pred" or "func"
>  			match(string),		% module name
>  			match(string),		% pred name
>  			match(arity),
> @@ -166,6 +167,7 @@
>  			call_number,
>  			depth_number,
>  			trace_port_type,
> +			string,		% "pred" or "func"
>  			string,		% module name
>  			string,		% pred name
>  			arity,

Hmm, wouldn't it be better to use an enumeration type
rather than a string here?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list