[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 = c

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

2020-03-23 Thread Leandro Müller
sunto: [Python-Dev] Re: Jump on C by PyEval_SetTrace Python 3.7.7 Hi. When I changed frame->f_lasti change de code to back, it's work but the line in front code occurs dump, the runtime over. Example: I jump to 8 line and after I jump to line 10, it occurs dump. On python trace pdb the ju

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

2020-03-23 Thread Leandro Müller
Hi. When I changed frame->f_lasti change de code to back, it's work but the line in front code occurs dump, the runtime over. Example: I jump to 8 line and after I jump to line 10, it occurs dump. On python trace pdb the jump works good by the frame-f_lineno. Att. Leandro Müller _

[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 ;-) Vict