SET_LINENO

Martin v. Löwis loewis at informatik.hu-berlin.de
Fri Sep 27 06:37:21 EDT 2002


Michael Hudson <mwh at python.net> writes:

> > So, wouldn't a break-point opcode be a more substantial improvement
> > than removing SET_LINENO? Just bringing up that old topic again to see
> > if it gets any more traction :-)
> 
> How would a breakpoint opcode differ from what SET_LINENO was?

This is easy to answer: a breakpoint instruction could be inserted in
the code at the points where the user wishes to have a
breakpoint. Thus, with a breakpoint instruction, you could disable all
tracing, and wait for the breakpoint callback.

With such a scheme, you can have zero-overhead debugging, for
breakpoints. If your debugger supports watchpoints, you get overhead,
again.

Regards,
Martin




More information about the Python-list mailing list