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
leo



Reply via email to