On Fri, 29 Aug 2003, Leopold Toetsch wrote:

> Tracing through Parrot programs shows the type and value of variables. 
> This doesn't work very well for PMCs, trace_pmc_dump() tries to extract 
> some info from the PMC, but much better would it be, if the PMC itself 
> can return a string representation of itself.
> 
> STRING* dump(INTERP, SELF, STRING *, INTVAL flags);
> 
> append and return a printable representation of SELF, with flags being:
> 0x1 ... name (whoami)
> 0x2 ... id (enum)
> 0x4 ... value(s) (non aggregates)
> 0x8 ... address
> ...     e.g. newlines, tabs in output for aggregates
> 0x100...n ... dump of aggregate items at nesting (n-0x100)
> 
> Comments welcome

I think we'd be better served getting the freeze/thaw stuff in and 
teaching the debugger how to dump a frozen PMC. This'll get us two 
benefits:

1) We'll have a single way to dump a PMC rather than two
2) We'll have a mechanism in place to handle PMC constants better

If we make the initial dump scheme something mildly human readable (XML, 
YAML, whatever) then the debugger doesn't have to worry about formatting 
it for a while. (And we're going to want a pluggable dump scheme anyway, 
to make experimentation eaiser)

                                        Dan

Reply via email to