[Python-Dev] about line numbers
Vladimir Marangozov
Vladimir.Marangozov@inrialpes.fr
Fri, 20 Aug 1999 22:22:12 +0100 (NFT)
Guido van Rossum wrote:
>
>
> I'm a little anxious about modifying the code, and was thinking myself
> of a way to specify a bitvector of addresses where to break. But that
> would still cause some overhead for code without breakpoints, so I
> guess you're right (and it's certainly a long-standing tradition in
> breakpoint-setting!)
>
Hm. You're probably right, especially if someone wants to inspect
a code object from the debugger or something. But I belive, that
we can manage to redirect the instruction pointer in the beginning
of eval_code2 to the *copy* of co_code, and modify the copy with
CALL_TRACE, preserving the original intact.
--
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252