[m-dev.] Add an bool argument to filter

Erwan Jahier Erwan.Jahier at irisa.fr
Sat Oct 30 01:57:12 AEST 1999


| On 29-Oct-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
| > This change implements the Fergus suggestion; i.e. add an argument to filter 
| > that returns a bool saying whether we stop collecting or not.
| > 
| > trace/mercury_trace_external.c:
| > Opium-M/source/collect.in:
| > Opium-M/source/collect.op:
| > 	Add an new argument to filter that says saying whether we stop 
| > 	collecting or not.
| > 
| > Opium-M/source/collect.op:
| > 	Also improve the documentation by describing the event type.
| > 
| > Index: 0.4/mercury_trace_external.c
| > --- 0.4/mercury_trace_external.c Fri, 29 Oct 1999 09:00:28 +0200 jahier (collect/3_mercury_tr 1.3 640)
| > +++ 0.4(w)/mercury_trace_external.c Fri, 29 Oct 1999 11:41:39 +0200 jahier (collect/3_mercury_tr 1.3 640)
| >  	static bool    	collect_linked = FALSE;
| > +	static bool    	stop_collecting = FALSE;
| >  	Integer		debugger_request_type;
| >  	Integer		live_var_number;
| >  	Word		debugger_request;
| 
| Why is the stop_collecting variable declared `static'?

It is an error.
Removed.

| > +			if (stop_collecting) {
| > +				(*send_collect_result_ptr)(
| > +					(Word) MR_collecting_variable,
| > +					(Word) &MR_debugger_socket_out);
| > +				external_debugger_mode = MR_reading_request;
| > +				#if defined(HAVE_DLFCN_H)&&defined(HAVE_DLCLOSE)
| > +					dlclose((void *)handle);
| > +				#endif
| > +				break;
| 
| I detect some duplicate code here;
| it might be a good idea to abstract that code out into
| a separate function.

Done.

I'm waiting for the previous change (the collect implementation) to be 
committed to show you the relative diff of that one.





-- 
R1.


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list