[m-dev.] for review: the new debugger command set (part 1 of 5)

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 18 20:06:25 AEST 1998


On 18-Sep-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 16-Sep-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > 
> > Since we want full debugger functionality in the release, this diff
> > is for inclusion in the release. The nominated reviewers are Fergus
> > and Tyson, but I would also like feedback from Erwan.
> > 
> > Note that this change is not quite complete, in two respects. One, the new
> > debugging chapter in the user guide is not finished; I'd like your feedback
> > on what level of explanatory detail is required. Two, this change makes
> > functions in the runtime called by MR_trace to refer to the library.
> > We have tried to avoid such references so far, by putting the references
> > into the auto-generated *_init.c files. However, we can't do this with
> > the new references, because this would pull into *every* executable
> > library modules that are required only if some module is execution traced.
> > I'd appreciate suggestions for better solutions.

The `mkinit' program already has the following option:

        -i, --include-initialization-code
                Always include code that calls the initialization functions
                of the various modules. With this option, the debugger can use
                information from any modules that were compiled with execution
                tracing to print (partial) stack traces, and to print the
                values of variables in ancestors of the current call, even
                in grades in which this not normally possible.

This option solves a similar problem of avoiding linking in code that
is needed only for debugging if you're not doing debugging.
You could instead have an option `--debug' which has that effect and also
the effect of setting the references in the auto-generated *_init.c
files to point to the relevant library routines;
if `--debug' is *not* specified, the pointers could be set to point
to routines which just print an error message saying to remake
the init file with `--debug' to enable debugging.

> One solution is to move some of the debugger stuff out of the runtime
> and into a separate library that depends on the standard library.

That would be a fine solution too.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list