[m-dev.] For review: Stacks dump in the external debugger

Erwan Jahier Erwan.Jahier at irisa.fr
Fri Feb 12 20:21:15 AEDT 1999


| > One thing I can do is create a temporary file, put in it the output of
| > MR_dump_stack_from_layout, reread it word by word and send them to the socket.
| 
| Ugh.  Horrible.
| 
| > Do you see some simpler to do that? (without rewriting all the stack_dump stuff)
| 
| How about changing the stack_dump stuff so that the function
| `MR_dump_stack_record_print' is passed down as a parameter?
| Then the internal debugger can pass down the current
| `MR_dump_stack_record_print', and the external debugger
| can pass down the address of a new function which prints
| the data to the socket as a Prolog term.


But quite a lot of outputs are done via calls to fprintf(fp, ...) in
mercury_stack_trace.c. Is that ok for them to be printed on stdout in the
external debugger ? Or should I use another function pointer (MR_my_fprintf)
that I would pass in argument of every dump function ?

| I think you will find that this is *much* nicer than using a
| temporary file :-)

Well, I was just trying to avoid changes in the internal debugger.
-- 
R1.





More information about the developers mailing list