@@ -4815,7 +4815,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
48154815#endif
48164816 fprintf (stderr ,
48174817 "XXX lineno: %d, opcode: %d\n" ,
4818- PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * 2 ),
4818+ PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * sizeof ( _Py_CODEUNIT ) ),
48194819 opcode );
48204820 _PyErr_SetString (tstate , PyExc_SystemError , "unknown opcode" );
48214821 goto error ;
@@ -5996,7 +5996,7 @@ call_trace(Py_tracefunc func, PyObject *obj,
59965996 }
59975997 else {
59985998 initialize_trace_info (& tstate -> trace_info , frame );
5999- f -> f_lineno = _PyCode_CheckLineNumber (frame -> f_lasti * 2 , & tstate -> trace_info .bounds );
5999+ f -> f_lineno = _PyCode_CheckLineNumber (frame -> f_lasti * sizeof ( _Py_CODEUNIT ) , & tstate -> trace_info .bounds );
60006000 }
60016001 result = func (obj , f , what , arg );
60026002 f -> f_lineno = 0 ;
@@ -6035,8 +6035,8 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
60356035 then call the trace function if we're tracing source lines.
60366036 */
60376037 initialize_trace_info (& tstate -> trace_info , frame );
6038- int lastline = _PyCode_CheckLineNumber (instr_prev * 2 , & tstate -> trace_info .bounds );
6039- int line = _PyCode_CheckLineNumber (frame -> f_lasti * 2 , & tstate -> trace_info .bounds );
6038+ int lastline = _PyCode_CheckLineNumber (instr_prev * sizeof ( _Py_CODEUNIT ) , & tstate -> trace_info .bounds );
6039+ int line = _PyCode_CheckLineNumber (frame -> f_lasti * sizeof ( _Py_CODEUNIT ) , & tstate -> trace_info .bounds );
60406040 PyFrameObject * f = _PyFrame_GetFrameObject (frame );
60416041 if (f == NULL ) {
60426042 return -1 ;
@@ -6978,7 +6978,7 @@ dtrace_function_entry(InterpreterFrame *frame)
69786978 PyCodeObject * code = frame -> f_code ;
69796979 filename = PyUnicode_AsUTF8 (code -> co_filename );
69806980 funcname = PyUnicode_AsUTF8 (code -> co_name );
6981- lineno = PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * 2 );
6981+ lineno = PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * sizeof ( _Py_CODEUNIT ) );
69826982
69836983 PyDTrace_FUNCTION_ENTRY (filename , funcname , lineno );
69846984}
@@ -6993,7 +6993,7 @@ dtrace_function_return(InterpreterFrame *frame)
69936993 PyCodeObject * code = frame -> f_code ;
69946994 filename = PyUnicode_AsUTF8 (code -> co_filename );
69956995 funcname = PyUnicode_AsUTF8 (code -> co_name );
6996- lineno = PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * 2 );
6996+ lineno = PyCode_Addr2Line (frame -> f_code , frame -> f_lasti * sizeof ( _Py_CODEUNIT ) );
69976997
69986998 PyDTrace_FUNCTION_RETURN (filename , funcname , lineno );
69996999}
@@ -7010,12 +7010,12 @@ maybe_dtrace_line(InterpreterFrame *frame,
70107010 instruction window, reset the window.
70117011 */
70127012 initialize_trace_info (trace_info , frame );
7013- int lastline = _PyCode_CheckLineNumber (instr_prev * 2 , & trace_info -> bounds );
7014- int line = _PyCode_CheckLineNumber (frame -> f_lasti * 2 , & trace_info -> bounds );
7013+ int lastline = _PyCode_CheckLineNumber (instr_prev * sizeof ( _Py_CODEUNIT ) , & trace_info -> bounds );
7014+ int line = _PyCode_CheckLineNumber (frame -> f_lasti * sizeof ( _Py_CODEUNIT ) , & trace_info -> bounds );
70157015 if (line != -1 ) {
70167016 /* Trace backward edges or first instruction of a new line */
70177017 if (frame -> f_lasti < instr_prev ||
7018- (line != lastline && frame -> f_lasti * 2 == trace_info -> bounds .ar_start ))
7018+ (line != lastline && frame -> f_lasti * sizeof ( _Py_CODEUNIT ) == trace_info -> bounds .ar_start ))
70197019 {
70207020 co_filename = PyUnicode_AsUTF8 (frame -> f_code -> co_filename );
70217021 if (!co_filename ) {
0 commit comments