Hi, It seems like you should be to modify frame->f_lasti in a trace function
FYI in a frame object, the line number is computed using frame->f_lasti and f->f_code->co_lnotab: PyFrame_GetLineNumber(). See: https://github.com/python/cpython/blob/master/Objects/lnotab_notes.txt Good luck ;-) Victor Le lun. 23 mars 2020 à 00:50, Leandro Müller <[email protected]> a écrit : > > Hi everyone. > > I'm trying to make a simple jump on C funcion trace by frame->f_lineno. > Example is simple, but not working. > > > if (frame->f_lineno == 12){ > > frame->f_lineno = 8; > > } > > attached files C and python to run test. > the line 12 I need to jump to line 8. > > > > Att. > > Leandro Müller > > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/7RZX4MUF6GLPU4DVXLRTQ534TDRXRL36/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/NRZM3MYRESKG6HCX44KEQINIRYYTKVDO/ Code of Conduct: http://python.org/psf/codeofconduct/
