Mark Shannon added the comment:

The interaction between bdb/pdb and the line number table is via the 
frame.f_lineno attribute.

Allowing signed offsets changes the one-to-one line muber => bytecode offset 
relation into a one-to-many relation.

Reading frame.f_lineno is not an issue as each bytecode offset will always 
refer to exactly one line number.

Setting frame.f_lineno requires some thought as each line number could 
potentially refer to several bytecode offsets. However, the proposed patch 
retains the one-to-one relation, as the test in the while statement is merely 
moved, not duplicated.

I am reluctant to change frame_setlineno() until there really is a one-to-many 
relation as it will be untestable.
Once a one-to-many relation exists (e.g. duplicating finally blocks to avoid 
'pseudo excpetions') then frame_setlineno should be modified (and tests added)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to