
    "e{                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZm	Z	 d dl
mZ  G d d      Z e       Zd	 Zd
 Zd Zd Zy)    N)	pydev_log)	threading)get_global_debugger)*get_abs_path_real_path_and_base_from_frameNORM_PATHS_AND_BASE_CONTAINER)set_additional_thread_infoc                       e Zd ZdZd Zy)DummyTracingHolderNc                     || _         y N)dummy_trace_func)self
trace_funcs     I/usr/lib/python3/dist-packages/_pydevd_frame_eval/pydevd_frame_tracing.pyset_trace_funcz!DummyTracingHolder.set_trace_func   s
     *    )__name__
__module____qualname__r   r    r   r   r
   r
   
   s    +r   r
   c                 6    dt         i}| j                  |       y )N_pydev_stop_at_break)r   update)globals_dictnew_globalss     r   update_globals_dictr      s    )+?@K$r   c                 R    | j                   }d | _         | j                  }|| _         |S r   )f_tracef_lineno)frametracing_funclines      r   _get_line_for_framer#      s'    ==LEM>>D EMKr   c                    t        j                  d      }t        j                         }	 |j                  }|j                  ry |xj                  dz  c_        	 t               }|	 |xj                  dz  c_        y t        j                  d|j                  j                  |        d|_        t         j                  d   }|j                         }|j                  |j                  |_        n|j#                         |_        |xj                  dz  c_        y #  t        |      }Y xY w# |xj                  dz  c_        w xY w)N   z=Setting f_trace due to frame eval mode in file: %s on line %s
frame_evalz3_pydevd_frame_eval.pydevd_frame_eval_cython_wrapper)sys	_getframer   current_threadadditional_infor   
is_tracingr   r   debugf_codeco_filenametrace_suspend_typemodulesget_thread_info_pythread_trace_funcr   get_thread_local_trace_func)r"   r    tr*   py_db pydevd_frame_eval_cython_wrapperthread_infos          r   r   r   "   s   MM!E  "A8++ !!!#(#%= 	""a'" 	WY^YeYeYqYqswx-9*+.;;7l+m(6IIK((4'99EM!==?EM""a'"-84Q7* 	""a'"s   D D- =BD- D*-Ec                    t        j                         }	 |j                  }|j                  ry|xj                  dz  c_        	 t        j                  d      }|j                  	 |xj                  dz  c_        yt               }|	 |xj                  dz  c_        y	 t        |j                  j                     }|d   }	 |j                  |   |    }|r	 |xj                  dz  c_        y	 |xj                  dz  c_        y#  t        |      }Y xY w#  t        |      }Y ixY w#  Y |xj                  dz  c_        yxY w# |xj                  dz  c_        w xY w)a`  
    We separate the functionality into 2 functions so that we can generate a bytecode which
    generates a spurious line change so that we can do:

    if _pydev_needs_stop_at_break():
        # Set line to line -1
        _pydev_stop_at_break()
        # then, proceed to go to the current line
        # (which will then trigger a line event).
    Fr%   T)r   r)   r*   r   r+   r'   r(   r   r   r   r-   r.   r   breakpoints)r"   r4   r*   r    r5   abs_path_real_path_and_basecanonical_normalized_filenamepython_breakpoints           r   _pydev_needs_stop_at_breakr=   A   si    	  "A8++ !!!#!(a ==$8 	""a'"5 $%=0 	""a'"-	\*GH`H`*a' )DA(F%		 % 1 12O PQU V  	""a'" 
 	""a'"U84Q7&	\*TUZ*['
	  	""a'"""a'"sS   D !E =E !D >E D* E DD'%E *E,E E E)r'   _pydev_bundler   "_pydev_bundle._pydev_saved_modulesr   _pydevd_bundle.pydevd_commr   pydevd_file_utilsr   r   ,_pydevd_bundle.pydevd_additional_thread_infor   r
   dummy_tracing_holderr   r#   r   r=   r   r   r   <module>rD      s@    
 # 8 : g S+ + *+ %
(>8r   