diff: interface to external opium-style debugger (round 2)

Erwan Jahier Erwan.Jahier at irisa.fr
Thu Mar 12 21:11:36 AEDT 1998


Thank you very much for this diff Fergus.

Fergus Henderson wrote:

> It also includes (working) code for sending the
> procedure arguments down the socket to the debugger.

Hmmm... It seems there is one less rubric in my "to do list" :-)
Maybe I should send you the rest that list one day... 

> RCS file: /home/mercury1/repository/mercury/library/io.m,v
> retrieving revision 1.151
> diff -u -u -r1.151 io.m
> --- io.m        1998/02/27 16:11:15     1.151
> +++ io.m        1998/03/11 19:16:40
> @@ -2038,11 +2038,6 @@
>  ** Mercury files are not quite the same as C stdio FILEs,
>  ** because we keep track of a little bit more information.
>  */
> -
> -typedef struct mercury_file {
> -       FILE *file;
> -       int line_number;
> -} MercuryFile;

The comment above seems to go with the code you removed. Shouldn't you
removed it either or am I missing something ?

>  extern MercuryFile mercury_stdin;
>  extern MercuryFile mercury_stdout;

> Index: runtime/mercury_trace.c
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_trace.c,v
> retrieving revision 1.7
> diff -u -u -r1.7 mercury_trace.c
> --- mercury_trace.c     1998/02/04 03:55:31     1.7
> +++ mercury_trace.c     1998/03/11 21:29:21
> @@ -61,7 +61,6 @@
>  */
> 
>  typedef enum {
> -       MR_CMD_ABORT,   /* a: abort the current execution                 */

Why ?

>         MR_CMD_CONT,    /* c: continue to end, not printing the trace     */
>         MR_CMD_DUMP,    /* d: continue to end, printing the trace         */
>         MR_CMD_NEXT,    /* n: go to the next trace event                  */

> Index: runtime/mercury_types.h
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_types.h,v
> retrieving revision 1.8
> diff -u -u -r1.8 mercury_types.h
> --- mercury_types.h     1998/02/03 08:17:28     1.8
> +++ mercury_types.h     1998/02/27 16:44:31
> @@ -54,6 +55,12 @@
> 
>  /* spinlocks -- see mercury_spinlock.h */
>  typedef Word   SpinLock;
> +

/*
** Mercury files are not quite the same as C stdio FILEs,
** because we keep track of a little bit more information.
*/

If you remove that comment from io.m as I suggested, I suppose you
should put it here.

> +/* MercuryFile is used for the Mercury io__stream type in library/io.m */
> +typedef struct mercury_file {
> +       FILE *file;
> +       int line_number;
> +} MercuryFile;
> 
>  /*
>  ** semidet predicates indicate success or failure by leaving nonzero or zero



-- 
R1.



More information about the developers mailing list