� c��j%�����dZddlZddlZddlZddlmZddlmZmZm Z gd�Z eeze zZ Gd�de �Z Gd�d �Zd �ZGd �d �Zd �Zd�ZGd�de�Zd�Zd�Zd�Zy)zDebugger basics�N)�contextmanager)� CO_GENERATOR� CO_COROUTINE�CO_ASYNC_GENERATOR)�BdbQuit�Bdb� Breakpointc��eZdZdZy)rz Exception to give up completely.N)�__name__� __module__� __qualname__�__doc__���/usr/lib64/python3.12/bdb.pyrrs��*rrc�B�eZdZdZd1d�Zd�Zd�Zed��Zd�Z d�Z d �Z d �Z d �Z d �Zd �Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd2d�Zd�Zd1d�Zd�Zd�Zd�Zd1d�Zd�Zd�Zd�Z d3d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d4d,�Z.d5d-�Z/d5d.�Z0d/�Z1d0�Z2y)6raGeneric Python debugger base class. This class takes care of details of the trace facility; a derived class should implement user interaction. The standard debugger class (pdb.Pdb) is an example. The optional skip argument must be an iterable of glob-style module name patterns. The debugger will not step into frames that originate in a module that matches one of these patterns. Whether a frame is considered to originate in a certain module is determined by the __name__ in the frame globals. Nc��|r t|�nd|_i|_i|_d|_d|_|j �y�N)�set�skip�breaks�fncache�frame_returning� enterframe� _load_breaks)�selfrs r�__init__z Bdb.__init__ s:��!%�C��I�4�� ��� ��� �#������ ���rc���|d|ddzdzk(r|S|jj|�}|sMtjj |�}tjj |�}||j|<|S)a%Return canonical form of filename. For real filenames, the canonical form is a case-normalized (on case insensitive filesystems) absolute path. 'Filenames' with angle brackets, such as "", generated in interactive mode, are returned unchanged. �<�������>)r�get�os�path�abspath�normcase)r�filename�canonics rr)z Bdb.canonic)sq�� �s�X�a��^�+�c�1� 1��O��,�,�"�"�8�,����g�g�o�o�h�/�G��g�g�&�&�w�/�G�%,�D�L�L�� "��rc�^�ddl}|j�d|_|jdd�y)z5Set values of attributes as ready to start debugging.rN)� linecache� checkcache�botframe� _set_stopinfo)rr+s r�resetz Bdb.reset:s(��������� � ���4��&rc#�0K�||_d��d|_y�wr)r�r�frames r�set_enterframezBdb.set_enterframeAs������� ����s�c�X�|j|�5|jr ddd�y|dk(r|j|�cddd�S|dk(r|j||�cddd�S|dk(r|j ||�cddd�S|dk(r|j ||�cddd�S|dk(r|j cddd�S|dk(r|j cddd�S|dk(r|j cddd�Std t|��|j cddd�S#1swYyxYw) aODispatch a trace function for debugged frames based on the event. This function is installed as the trace function for debugged frames. Its return value is the new trace function, which is usually itself. The default implementation decides how to dispatch a frame, depending on the type of event (passed in as a string) that is about to be executed. The event can be one of the following: line: A new line of code is going to be executed. call: A function is about to be called or another code block is entered. return: A function or other code block is about to return. exception: An exception has occurred. c_call: A C function is about to be called. c_return: A C function has returned. c_exception: A C function has raised an exception. For the Python events, specialized functions (see the dispatch_*() methods) are called. For the C events, no action is taken. The arg parameter depends on the previous event. N�line�call�return� exception�c_call� c_exception�c_returnz*bdb.Bdb.dispatch: unknown debugging event:) r3�quitting� dispatch_line� dispatch_call�dispatch_return�dispatch_exception�trace_dispatch�print�repr)rr2�event�args rrAzBdb.trace_dispatchGs��2� � �� '��}�}��(� '�����)�)�%�0� (� '� ����)�)�%��5� (� '��� ��+�+�E�3�7�(� '�� �#��.�.�u�c�:�(� '��� ��*�*�(� '�� �%��*�*�(� '�� �"��*�*�!(� '�" �>��U� � L��&�&�%(� '� '�s:�D �D �D �(D �D �(D �D �D �6 D � D)c��|j|�s|j|�r#|j|�|jrt�|j S)a Invoke user function and return trace function for line event. If the debugger stops on the current line, invoke self.user_line(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. )� stop_here� break_here� user_liner<rrAr1s rr=zBdb.dispatch_linets>�� �>�>�%� �D�O�O�E�$:� �N�N�5� !��}�}�G�m��"�"�"rc�d�|j�|j|_|jS|j|�s|j |�sy|j r)|j jtzr |jS|j||�|jrt�|jS)a Invoke user function and return trace function for call event. If the debugger stops on this function call, invoke self.user_call(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. N) r-�f_backrArG�break_anywhere� stopframe�f_code�co_flags�GENERATOR_AND_COROUTINE_FLAGS� user_callr<r�rr2rEs rr>zBdb.dispatch_call�s��� �=�=� �!�L�L�D�M��&�&� &����u�%��)<�)<�U�)C� � �>�>�e�l�l�3�3�6S�S��&�&� &� ���u�c�"� �=�=��-��"�"�"rc���|j|�s||jk(r�|jr)|jjt zr |j S ||_|j||�d|_|jrt�|j|ur!|jdk7r|jdd�|jdk7r|j|�|j S#d|_wxYw)aInvoke user function and return trace function for return event. If the debugger stops on this function return, invoke self.user_return(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. Nr!)rG� returnframerMrNrOrPrAr� user_returnr<r� stoplinenor.�_set_caller_tracefuncrRs rr?zBdb.dispatch_return�s��� �>�>�%� �E�T�-=�-=�$=��~�~�%�,�,�"7�"7�:W�"W��*�*�*� ,�',��$�� � ���,�'+��$��}�}�G�m��~�~��&�4�?�?�b�+@��"�"�4��.����"�$��*�*�5�1��"�"�"��(,��$�s �C$�$ C-c���|j|�r]|jjtzr|dtur|d�$|j ||�|j rt�|jS|jrj||jur\|jjjtzr5|dttfvr$|j ||�|j rt�|jS)aInvoke user function and return trace function for exception event. If the debugger stops on this exception, invoke self.user_exception(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. r�) rGrNrOrP� StopIteration�user_exceptionr<rrM� GeneratorExitrArRs rr@zBdb.dispatch_exception�s��� �>�>�%� ��L�L�)�)�,I�I��A��-�/�C��F�N��#�#�E�3�/��=�=��-��"�"�"� �n�n��d�n�n�!<��N�N�)�)�2�2�5R�R���F�}�m�<�<� � � ��s� +��}�}�G�m��"�"�"rc�\�|�y|jD]}tj||�s�yy)z4Return True if module_name matches any skip pattern.FT)r�fnmatch)r� module_name�patterns r�is_skipped_modulezBdb.is_skipped_module�s/�� � ���y�y�G����{�G�4��!�rc���|jr+|j|jjd��ry||jur)|j dk(ry|j |j k\S|jsyy)z>Return True if frame is below the starting frame in the stack.r Fr!T)rra� f_globalsr#rMrV�f_linenor1s rrGz Bdb.stop_here�sf�� �9�9��%�%�e�o�o�&9�&9�*�&E�F�� �D�N�N� "����"�$���>�>�T�_�_�4� 4��~�~��rc��|j|jj�}||jvry|j}||j|vr(|jj }||j|vryt |||�\}}|rD|j|_|r0|jr$|jt|j��yy)z�Return True if there is an effective breakpoint for this line. Check for line or function breakpoint and if in effect. Delete temporary breakpoints if effective() says to. FT) r)rN� co_filenamerrd�co_firstlineno� effective�number� currentbp� temporary�do_clear�str)rr2r(�lineno�bp�flags rrHzBdb.break_here�s��� �<�<�� � � 8� 8�9�� �4�;�;� &������ ����X�.� .��\�\�0�0�F��T�[�[��2�2���x���7� ��T� ��Y�Y�D�N������ � �c�"�)�)�n�-��rc��td��)zlRemove temporary breakpoint. Must implement in derived classes or get NotImplementedError. z)subclass of bdb must implement do_clear())�NotImplementedError)rrEs rrlz Bdb.do_clears�� "�"M�N�Nrc�d�|j|jj�|jvS)zEReturn True if there is any breakpoint for frame's filename. )r)rNrfrr1s rrLzBdb.break_anywhere s&���|�|�E�L�L�4�4�5����D�Drc��y)z&Called if we might stop in a function.Nr)rr2� argument_lists rrQz Bdb.user_call��� rc��y)z'Called when we stop or break at a line.Nrr1s rrIz Bdb.user_linervrc��y)z&Called when a return trap is set here.Nr)rr2� return_values rrUzBdb.user_returnrvrc��y)z$Called when we stop on an exception.Nr)rr2�exc_infos rr[zBdb.user_exceptionrvrc�<�||_||_d|_||_y)z�Set the attributes for stopping. If stoplineno is greater than or equal to 0, then stop at line greater than or equal to the stopline. If stoplineno is -1, then don't stop at all. FN)rMrTr<rV)rrMrTrVs rr.zBdb._set_stopinfo"s#��#���&����� �%��rc�|�|j}|r.|js!||jur|j|_yyyyr)rK�f_tracer-rA)r� current_frame� caller_frames rrWzBdb._set_caller_tracefunc0s>�� %�+�+� � � � 4� 4��T�]�]�9Z�#'�#6�#6�L� �:[� 4���^�^�a�'�F� ���5�%��0rc�(�|jdd�y)zStop after one line of code.N�r.�rs r�set_stepz Bdb.set_stepEs�� ���4��&rc�(�|j|d�y)z2Stop on the next line in or below the given frame.Nr�r1s r�set_nextz Bdb.set_nextIs�� ���5�$�'rc��|jjtzr|j|dd�y|j|j|�y)z)Stop when returning from the given frame.Nr!)rNrOrPr.rKr1s r� set_returnzBdb.set_returnMs;�� �<�<� � �#@� @� � � �u�d�B� /� � � �u�|�|�U� 3rc��tjd�|�tj�j}|j �|j |�5|r'|j |_||_|j}|r�'|j�ddd�tj|j �y#1swY�)xYw)znStart debugging from frame. If frame is not specified, debugging starts from caller's frame. N) �sys�settrace� _getframerKr/r3rAr~r-r�r1s r� set_tracez Bdb.set_traceTs��� � � �T�� �=��M�M�O�*�*�E� � � � � � � �� '�� $� 3� 3�� � %�� �� � ��� �M�M�O� (� � � �T�(�(�)� (� '�s�)B9�B9�9Cc�"�|j|jdd�|jsftjd�tj �j }|r0||jur!|`|j }|r||jur�yyyyy)z�Stop only at breakpoints or when finished. If there are no breakpoints, set the system trace function to None. Nr!)r.r-rr�r�r�rKr~r1s r� set_continuezBdb.set_continueesv�� ���4�=�=�$��3��{�{� �L�L�� ��M�M�O�*�*�E��E����6��M�� � ���E����6�%�6�%� rc�l�|j|_d|_d|_t j d�y)zuSet quitting attribute to True. Raises BdbQuit exception in the next call to a dispatch_*() method. NT)r-rMrTr<r�r�r�s r�set_quitz Bdb.set_quitts*�� ���������� � � � �T�rc�h�|jj|g�}||vr|j|�yy)z/Add breakpoint to breaks, if not already there.N)r� setdefault�append)rr(rn� bp_linenoss r�_add_to_breakszBdb._add_to_breaks�s3���[�[�+�+�H�b�9� � �� #� � � �f� %� $rc�$�|j|�}ddl}|j||�}|sd||fzS|j||�t |||||�}|j } | r1|j | �r|j| _| j} | r�1y)z�Set a new breakpoint for filename:lineno. If lineno doesn't exist for the filename, return an error message. The filename should be in canonical form. rNzLine %s:%d does not exist) r)r+�getliner�r rrLrAr~rK) rr(rnrk�cond�funcnamer+r5ror2s r� set_breakz Bdb.set_break�s����<�<��)���� � ��6�2���.�(�F�1C�C� C� ���H�f�-� ��&�)�T�8� D��������"�"�5�)� $� 3� 3�� ��L�L�E��rc�t�tjj�D]\}}|j||��y)aOApply all breakpoints (set in other instances) to this one. Populates this instance's breaks list from the Breakpoint class's list, which can have breakpoints set by another Bdb instance. This is necessary for interactive sessions to keep the breakpoints active across multiple calls to run(). N)r �bplist�keysr��rr(rns rrzBdb._load_breaks�s2��#-�"3�"3�"8�"8�":� �X�v� � � ��&� 1�#;rc��||ftjvr|j|j|�|j|s|j|=yy)aPrune breakpoints for filename:lineno. A list of breakpoints is maintained in the Bdb instance and in the Breakpoint class. If a breakpoint in the Bdb instance no longer exists in the Breakpoint class, then it's removed from the Bdb instance. N)r r�r�remover�s r� _prune_breakszBdb._prune_breaks�sK�� �f� �Z�%6�%6� 6� �K�K�� !� (� (�� 0��{�{�8�$�� � �H�%�%rc���|j|�}||jvrd|zS||j|vrd||fzStj||fddD]}|j ��|j ||�y)znDelete breakpoints for filename:lineno. If no breakpoints were set, return an error message. �There are no breakpoints in %szThere is no breakpoint at %s:%dN)r)rr r��deleteMer�)rr(rnros r� clear_breakzBdb.clear_break�s��� �<�<��)�� �4�;�;� &�3�h�>� >� ����X�.� .�4��&�7I�I� I��#�#�H�f�$4�5�a�8�B� �K�K�M�9� ���8�V�,�rc��� |j|�}|j�|j |j |j �y#t$r}t|�cYd}~Sd}~wwxYw)zxDelete a breakpoint by its index in Breakpoint.bpbynumber. If arg is invalid, return an error message. N)�get_bpbynumber� ValueErrorrmr�r��filer5)rrEro�errs r�clear_bpbynumberzBdb.clear_bpbynumber�sX��  ��$�$�S�)�B� � � � � ���2�7�7�B�G�G�,��� � ��s�8�O�� �s�A � A(� A#�A(�#A(c���|j|�}||jvrd|zS|j|D].}tj||f}|D]}|j ���0|j|=y)z`Delete all breakpoints in filename. If none were set, return an error message. r�N)r)rr r�r�)rr(r5�blistros r�clear_all_file_breakszBdb.clear_all_file_breaks�st�� �<�<��)�� �4�;�;� &�3�h�>� >��K�K��)�D��%�%�h��n�5�E���� � � ��*� �K�K�� !�rc�|�|jsytjD]}|s�|j��i|_y)z]Delete all existing breakpoints. If none were set, return an error message. zThere are no breakpointsN)rr � bpbynumberr�)rros r�clear_all_breakszBdb.clear_all_breaks�s6�� �{�{�-��'�'�B��� � � �(��� �rc���|s td�� t|�} tj|}|�td|z��|S#t$rtd|z�d�wxYw#t$rtd|z�d�wxYw)z�Return a breakpoint by its index in Breakpoint.bybpnumber. For invalid arg values or if the breakpoint doesn't exist, raise a ValueError. zBreakpoint number expectedz Non-numeric breakpoint number %sNz!Breakpoint number %d out of rangezBreakpoint %d already deleted)r��intr r�� IndexError)rrEriros rr�zBdb.get_bpbynumber�s��� ��9�:� :� Q���X�F� U��&�&�v�.�B� �:��<�v�E�F� F�� ��� Q��?�#�E�F�D� P� Q��� U��@�6�I�J�PT� T� U�s� A�A�A�A5c�f�|j|�}||jvxr||j|vS)z9Return True if there is a breakpoint for filename:lineno.�r)rr�s r� get_breakz Bdb.get_break s7���<�<��)���4�;�;�&�,� �d�k�k�(�+� +� ,rc��|j|�}||jvxr(||j|vxrtj||fxsgS)znReturn all breakpoints for filename:lineno. If no breakpoints are set, return an empty list. )r)rr r�r�s r� get_breakszBdb.get_breakssY�� �<�<��)���4�;�;�&�0� �d�k�k�(�+� +�0� � � �h��.� /�6�35� 6rc�b�|j|�}||jvr|j|SgS)zrReturn all lines with breakpoints for filename. If no breakpoints are set, return an empty list. r�)rr(s r�get_file_breakszBdb.get_file_breakss2�� �<�<��)�� �t�{�{� "��;�;�x�(� (��Irc��|jS)z$Return all breakpoints that are set.)rr�s r�get_all_breakszBdb.get_all_breaks$s ���{�{�rc��g}|r|j|ur |j}|�;|j||jf�||jurn|j }|��;|j �tdt|�dz �}|�6|j|j|jf�|j}|��6|�tdt|�dz �}||fS)z�Return a list of (frame, lineno) in a stack trace and a size. List starts with original calling frame, if there is one. Size may be number of frames above or below f. rr ) �tb_frame�tb_nextr�rdr-rK�reverse�max�len� tb_lineno)r�f�t�stack�is r� get_stackz Bdb.get_stack+s��� �� ����q��� � �A��m� �L�L�!�Q�Z�Z�� )��D�M�M�!�����A� �m� � � �� ��3�u�:��>� "���m� �L�L�!�*�*�a�k�k�2� 3�� � �A��m� �9��A�s�5�z�A�~�&�A��a�x�rc���ddl}ddl}|\}}|j|jj�}|�d|�d�}|jj r||jj z }n|dz }|dz }d|j vr(|j d} |dz }||j| �z }|�7|j|||j�} | r||| j�zz }|S||�d �z }|S) a:Return a string with information about a stack entry. The stack entry frame_lineno is a (frame, lineno) tuple. The return string contains the canonical filename, the function name or '', the input arguments, the return value, and the line of code (if it exists). rN�(�)zz()� __return__z->zWarning: lineno is None) r+�reprlibr)rNrf�co_name�f_localsrCr�rc�strip) r� frame_lineno�lprefixr+r�r2rnr(�s�rvr5s r�format_stack_entryzBdb.format_stack_entryBs��� "�$� ��v��<�<�� � � 8� 8�9�� �&� )�� �<�<� � � ����%�%� %�A� ��O�A� �T� �� �5�>�>� )���� �-�B� ��I�A� ����b�!� !�A� � ��$�$�X�v�u���G�D���W�t�z�z�|�+�+���� �G�9�3�4� 4�A��rc�|�|�ddl}|j}|�|}|j�t|t�r t |dd�}t j|j� t|||�d|_ t jd�y#t$rY�(wxYw#d|_ t jd�wxYw)z�Debug a statement executed via the exec() function. globals defaults to __main__.dict; locals defaults to globals. Nrz�execT) �__main__�__dict__r/� isinstancerm�compiler�r�rAr�rr<)r�cmd�globals�localsr�s r�runzBdb.runds��� �?� ��'�'�G� �>��F� � � � � �c�3� ��#�z�6�2�C� � � �T�(�(�)� � ��g�v� &�!�D�M� �L�L�� �� � � � ��!�D�M� �L�L�� �s$�$ B� B�B�B�B�B;c�|�|�ddl}|j}|�|}|j�tj|j � t |||�d|_tjd�S#t$rYnwxYw d|_tjd�y#d|_tjd�wxYw)z�Debug an expression executed via the eval() function. globals defaults to __main__.dict; locals defaults to globals. NrT) r�r�r/r�r�rA�evalr<r)r�exprr�r�r�s r�runevalz Bdb.runevalzs��� �?� ��'�'�G� �>��F� � � � � � � �T�(�(�)� ���g�v�.�!�D�M� �L�L�� �� � � � �� � �D�M� �L�L�� ��!�D�M� �L�L�� �s$� A0�0 A<�9B�;A<�<B�B;c�*�|j|||�y)z.For backwards-compatibility. Defers to run().N)r�)rr�r�r�s r�runctxz Bdb.runctx�s�� ����g�v�&rc��|j�tj|j�d} ||i|��}d|_tjd�|S#t$rY�)wxYw#d|_tjd�wxYw)zWDebug a single function call. Return the result of the function call. NT)r/r�r�rArr<)r�func�args�kwds�ress r�runcallz Bdb.runcall�s|�� � � � � � � �T�(�(�)��� ���%��%�C�!�D�M� �L�L�� �� �� � � � ��!�D�M� �L�L�� �s#�A� A%�"A(�$A%�%A(�(Br)r�FNN)z: �NN)3r r r rrr)r/rr3rAr=r>r?r@rarGrHrlrLrQrIrUr[r.rWr�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrs �� ���"'����� +'�Z #�#�,#�6#�>� ��6O�E� � � � � %�7�1�'�(�4�*�" %��"&� AE���0 2� &��" � � ��(,� 6� ���.�D�,�('�rrc�4�t�j�y)z�>��D��D� �<�<��'�>�D��'�>�D�,�� � �T�04� � �4�9�9�0F�F�� �9�9� �D�I�I�7� 7�C� �;�;� �,�� � �~�=� =�C� �9�9��y�y�1�}����� �9�T�Y�Y��O�K� K�C�� rc�T�d|j�d|j�d|j��S)z1Return a condensed description of the breakpoint.z breakpoint z at �:)rir�r5r�s r�__str__zBreakpoint.__str__s��+/�;�;�� � �4�9�9�M�Mrr�r)r r r rr�r�r�r� staticmethodr�r�rrrrrrrrr r �sR���( �D� �F���J�-�(�'��'� #���)��<Nrr c��|js|j|jk7ryy|jj|jk7ry|j s|j|_|j |jk7ryy)aVReturn True if break should happen here. Whether a break should happen depends on the way that b (the breakpoint) was set. If it was set via line number, check if b.line is the same as the one in the frame. If it was set via function name, check if this is the right function and if it is on the first executable line. FT)r�r5rdrNr�r�)�br2s r� checkfuncnamer&sm�� �:�:� �6�6�U�^�^� #��� �|�|���q�z�z�)�� � '� '�',�~�~��$��#�#�u�~�~�5�� rc���tj||f}|D]�}|js�t||�s�|xjdz c_|j s+|j dkDr|xj dzc_�c|dfcS t|j |j|j�}|r+|j dkDr|xj dzc_n|dfcS��y#|dfcYcSxYw)a=Return (active breakpoint, delete temporary flag) or (None, None) as breakpoint to act upon. The "active breakpoint" is the first entry in bplist[line, file] (which must exist) that is enabled, for which checkfuncname is True, and that has neither a False condition nor a positive ignore count. The flag, meaning that a temporary breakpoint should be deleted, is False only when the condiion cannot be evaluated (in which case, ignore count is ignored). If no such entry exists, then (None, None) is returned. r rTFr�) r r�r�rr�r�r�r�rcr�)r�r5r2� possiblesr�vals rrhrhFs����!�!�$��*�-�I� ���y�y� ��Q��&� � ���!� ���v�v��x�x�!�|����A� ����4�y� �  "��1�6�6�5�?�?�E�N�N�C����x�x�!�|����A� ��!"�4�y�(��5�D ��  "��5�z�!�s �AC�C'c�$�eZdZd�Zd�Zd�Zd�Zy)�Tdbc�R�|jj}|sd}td||�y)N�???z+++ call)rNr�rB)rr2r��names rrQz Tdb.user_call|s$���|�|�#�#���E�T� �j�$��%rc �(�ddl}|jj}|sd}|j|jj�}|j ||j |j�}td||j |d|j��y)Nrrz+++r) r+rNr�r)rfr�rdrcrBr�)rr2r+r�fnr5s rrIz Tdb.user_line�sk����|�|�#�#���E�T� �\�\�%�,�,�2�2� 3��� � ��U�^�^�U�_�_�E�� �e�R�����s�D�J�J�L�Arc��td|�y)Nz +++ return�rB)rr2�retvals rrUzTdb.user_return�s �� �l�F�#rc�<�td|�|j�y)Nz +++ exception)rBr�)rr2� exc_stuffs rr[zTdb.user_exception�s�� �o�y�)� ���rN)r r r rQrIrUr[rrrrr{s��&�B�$�rrc�R�td|d�t|dz�}td|�y)Nzfoo(r�� z bar returned)rB�bar)�n�xs r�foor(�s%�� �&�!�S�� �A�b�D� �A� �.�!�rc�&�td|d�|dz S)Nzbar(r�rYr)�as rr%r%�s�� �&�!�S�� �Q�3�Jrc�:�t�}|jd�y)Nzimport bdb; bdb.foo(10))rr�)r�s r�testr,�s�� ��A��E�E� #�$r)rr^r�r$� contextlibr�inspectrrr�__all__rP� Exceptionrrr�r rrhrr(r%r,rrr�r1s����� � �%�B�B� *�� ,�|� ;�>P� P��+�i�+�R �R �j� uN�uN�t�@0�j�#��$� �%r