You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7255 Reporter: pboutill Status: acknowledged (set by @shindere on 2017-02-24T15:44:30Z) Resolution: open Priority: normal Severity: feature Version: 4.03.0 Target version: later Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
As end of #5958 states
Being able to install printers of shape (Formatter.t -> 'a -> unit) -> (Formatter.t -> 'a t -> unit) is super useful for debugging.
#5958 makes it work in ocaml(top). Could we imagine to make it work in ocamldebug too?
The text was updated successfully, but these errors were encountered:
I had a look at that during June 6th 2017 Cambridge MA compiler hacking session.
this summary may be cryptic but as it is probably a note for self... TL;DR we may need to register printers twice. Once for when value have to cross the debugger barrier, once for recursive calls of generic printers when the value is already on the right side of the world.
First quick&dirt easy part is to copy/paste the changes from the patch of #5958 in toplevel/topdirs.ml into debugger/loadprinter.ml. That make the debugger enable to recognise generic printers types. (a clean patch should probably find a relevant place to share code instead of copy/pasting...)
Trickier part:
debugger/printval.ml contains a wrapper of install_printer that makes values "cross the debugger barrier".
You would need to do a similar wrapper for install_generic_printer' BUT it is not as simple as that ... Register printers in the debugger takes Debugcom.Remote_value.t whereas we would need plain Obj.t printers for recursive cases.
Maybe by registering printers on plain Obj.t a second time to be used in recursive calls of generic_printers we would be able to do something....
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 7255
Reporter: pboutill
Status: acknowledged (set by @shindere on 2017-02-24T15:44:30Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.03.0
Target version: later
Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
As end of #5958 states
Being able to install printers of shape (Formatter.t -> 'a -> unit) -> (Formatter.t -> 'a t -> unit) is super useful for debugging.
#5958 makes it work in ocaml(top). Could we imagine to make it work in ocamldebug too?
The text was updated successfully, but these errors were encountered: