[m-dev.] compiler generated events

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 24 12:08:12 AEDT 1999


On 23-Feb-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> | You should be able to use the same grade for both the internal
> | and external debuggers.  They both need the same changes to
> | the generated C code: the compiler must generate calls to
> | MR_trace(), and it must keep the appropriate information
> | around so that the debugger can fetch the values of variables,
> | etc.
> 
> But external debugger code is under a #ifdef USE_EXTERNAL_DEBUGGER.

>From mercury_trace_external.c:

** The code for using an external debugger is conditionalized
** on MR_USE_EXTERNAL_DEBUGGER (which by default is not enabled)
** because it uses sockets, which are not portable.
** Ideally we ought to use autoconf for that...

The reason for that is not efficiency, it is just portability.
Efficiency-wise, the cost is minimal; almost all the code
for dealing with the external debugger is in the trace
library anyway, so there's no serious code space problem.
So if you fix the portability problem, by using autoconf,
then MR_USE_EXTERNAL_DEBUGGER can be enabled by default on
all systems which it is portable to.

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