At 11:14 AM -0500 11/1/04, Uri Guttman wrote:
 >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS>   dprinterr [PISN]x - Like printerr, but only when running in debug mode
  DS>   ifdebug label - If debug's on, branch to label
  DS>   unlessdebug label - branch to label unless debugging's on
  DS>   debugbsr label - do a bsr to the label if debugging's on

  DS> As well as making the current debug status part of the interpreter
  DS> info section which can be queried and branched on as needed. I can
  DS> certainly see skipping the if/unlessdebug stuff, though the print
  DS> only if debugging would make the code a lot cleaner, such as it
  DS> is. (I'm also thinking that a conditional bsr would be useful, but
  DS> I'm not sure it'd be useful *enough*) If it'd make the JIT unhappy
  DS> to have more branching ops they can be left out.

some random comments:

it looks like you have only one debug flag/level. would multiple
flags/levels be useful or hard to add? it would mean adding another arg
to the debug ops. if given no arg, it would default to level 1/flag 1 or
something like that.

Dunno. I generally either want it on or off. The logging stuff that Sam noted looks interesting, though.


what about a compile time (byte code generation? JIT?) option to
optimize out debug code so it doesn't even get run if not enabled?

That's not what I'm looking for, in part because at compile time I don't know if I need the debug stuff executed. Most of the code's in library modules which are precompiled and hanging around. I want their debug code in there, but only enabled when I need it. (Basically I run through a bunch of programs and when one or more fail I want to rerun and kick in debugging)


do we need JIT support for debugging? you can debug in bytecode and then
JIT for speed. this assumes, of course, that the JITing is correct.

Leo says no problem, so that's fine. This stuff's not really for debugging parrot, more for debugging pasm/pir code.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to