[Python-Dev] Re: Jump on C by PyEval_SetTrace Python 3.7.7 - SOLUTION

2020-03-24 Thread Xavier de Gaye
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 =

[Python-Dev] Re: Jump on C by PyEval_SetTrace Python 3.7.7 - SOLUTION

2020-03-23 Thread Leandro Müller
rks good by the frame-f_lineno. Att. Leandro Müller De: Victor Stinner Enviado: segunda-feira, 23 de março de 2020 13:01 Para: Leandro Müller Cc: python-dev@python.org Assunto: Re: [Python-Dev] Jump on C by PyEval_SetTrace Python 3.7.7 Hi, It seems like yo

[Python-Dev] Re: Jump on C by PyEval_SetTrace Python 3.7.7

2020-03-23 Thread Leandro Müller
ler De: Victor Stinner Enviado: segunda-feira, 23 de março de 2020 13:01 Para: Leandro Müller Cc: python-dev@python.org Assunto: Re: [Python-Dev] Jump on C by PyEval_SetTrace Python 3.7.7 Hi, It seems like you should be to modify frame->f_lasti in a trace functio

[Python-Dev] Re: Jump on C by PyEval_SetTrace Python 3.7.7

2020-03-23 Thread Victor Stinner
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 ;-)