[m-dev.] for review: print/browse exceptions in the debugger
Mark Anthony BROWN
dougl at cs.mu.OZ.AU
Mon Jun 19 18:10:27 AEST 2000
Fergus Henderson writes:
> On 17-Jun-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > @@ -836,6 +862,9 @@
> > if streq(words[1], "*") {
> > problem = MR_trace_browse_all(MR_mdb_out,
> > MR_trace_print_var);
> > + } else if streq(words[1], "exception") {
> > + problem = MR_trace_browse_exception(event_info,
> > + MR_trace_print_var);
> > } else if (MR_trace_is_number(words[1], &n)) {
> > var_spec.MR_var_spec_kind = MR_VAR_SPEC_NUMBER;
> > var_spec.MR_var_spec_number = n;
> > @@ -861,7 +890,10 @@
> > const char *problem;
> > int n;
> >
> > - if (MR_trace_is_number(words[1], &n)) {
> > + if streq(words[1], "exception") {
> > + problem = MR_trace_browse_exception(event_info,
> > + MR_trace_browse_var);
> > + } else if (MR_trace_is_number(words[1], &n)) {
> > var_spec.MR_var_spec_kind = MR_VAR_SPEC_NUMBER;
> > var_spec.MR_var_spec_number = n;
> > problem = MR_trace_browse_one(NULL, var_spec,
>
> It would be a good idea to put the conditions of those
> of-then-elses inside parentheses. Otherwise it may break
> if the definition of `streq' is changed.
>
Done. I've committed it now.
Cheers,
Mark.
--
Mark Brown, PhD student )O+ | "Another of Fortran's breakthroughs
(m.brown at cs.mu.oz.au) | was the GOTO statement, which was...
Dept. of Computer Science and Software | uniquely simple and understandable"
Engineering, University of Melbourne | -- IEEE, 1994
--------------------------------------------------------------------------
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