[New-bugs-announce] [issue31618] Change sys.settrace opcode tracing to occur after frame line number update

George King report at bugs.python.org
Thu Sep 28 08:40:03 EDT 2017


New submission from George King <george.w.king at gmail.com>:

This patch moves the new opcode tracing added in commit 5a85167 to happen after frame->f_lineno is updated. With this patch, when both f_trace_lines and f_trace_opcodes are enabled the trace function will see the same line number for both the 'line' and 'opcode' events.

A side effect of this patch is that the order of event emission has been switched; 'line' now happens before 'opcode'. Maintaining the current order would require more elaborate logic.

----------
messages: 303225
nosy: gwk, ncoghlan, nedbat, njs, serhiy.storchaka
priority: normal
pull_requests: 3783
severity: normal
status: open
title: Change sys.settrace opcode tracing to occur after frame line number update
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31618>
_______________________________________


More information about the New-bugs-announce mailing list