[m-dev.] spypoints in external debugger
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Sep 15 18:43:09 AEST 1999
On 15-Sep-1999, Gregory Daniel Denehy <gdenehy at cs.monash.edu.au> wrote:
>
> I have two questions in regards to adding spypoints to the external
> debugger interface that are mainly directed to Fergus and Erwan.
>
> The first is about return types. I have implemented some changes to the
> interface that allow breakpoints to be added by using the procedures from
> mercury_trace_spy.h in much the same manner as the internal debugger
> does. The debugger interface needs to reply to an 'add_breakpoint'
> request with either an 'ok.' if the request was successful, or some other
> reply if the request could not be matched with an existing procedure or
> the request was ambiguous. My question concerns how this should be done.
> Returning an 'ok.' term is obvious to me,
Yes, that sounds good.
> but I'm unsure whether the other
> cases should return a term of their own, eg 'no_such_procedure.', or
> return an error term.
For the "no such procedure", it probably doesn't matter much.
But for the "ambiguous procedure" error, where currently the internal
debugger lists all the matching procedure names, it would be very
useful if that information could be passed back to the external
debugger in an easily-parsable form so that it could, for example,
pop up a selection box so that the user could choose which one they meant.
Given that, it probably makes sense to handle the "no such procedure"
error analagously.
So I suggest adding
% responses to the "add_breakpoint request"
; no_such_procedure
; ambiguous_procedure
% An ambiguous_procedure response will be
% followed by a sequence of responses identifying
% the matching procedures and then `ok'.
% The responses identifying the matching procedures
% will be sent in the form described below.
The idea here is that you can reuse MR_print_proc_id_to_socket()
to identify the procedures.
I've just committed a change to browser/debugger_interface.m which
adds a description of the format used by MR_print_proc_id_to_socket(),
so the "described below" bit will make sense.
Note that my comment has a number of XXXs in it.
Erwan, it would be great if you could fix those XXXs!
--
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.
--------------------------------------------------------------------------
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