On 3/23/20 11:17 PM, Leandro Müller wrote:
Hello Victor Stinner.
Thanks. Your tip helped me a lot. I understood that I need to get position on bycode of the line. So I create the funcion to get position inside of the bycode. Now I can to jump the correct position on trace.
frame->f_lasti = checkBycodePosition(frame->f_code, 11);
There are cases where it is invalid to change f_lineno to avoid a python stack corruption. See the comments of the f_lineno setter frame_setlineno() in Objects/frameobject.c, the comments at the start of the function and inside the code itself.