ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/bdb.cpython-311.pyc

�

�f�~����dZddlZddlZddlZddlmZmZmZgd�ZeezezZ	Gd�de
��ZGd�d��Zd	�Z
Gd
�d��Zd�Zd
�ZGd�de��Zd�Zd�Zd�ZdS)zDebugger basics�N)�CO_GENERATOR�CO_COROUTINE�CO_ASYNC_GENERATOR)�BdbQuit�Bdb�
Breakpointc��eZdZdZdS)rz Exception to give up completely.N)�__name__�
__module__�__qualname__�__doc__���*/opt/alt/python311/lib64/python3.11/bdb.pyrr
s������*�*�*�*rrc�.�eZdZdZd2d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd3d�Zd2d�Zd�Zd�Zd�Zd2d�Zd�Zd�Zd�Z		d4d�Zd �Zd!�Z d"�Z!d#�Z"d$�Z#d%�Z$d&�Z%d'�Z&d(�Z'd)�Z(d*�Z)d+�Z*d5d-�Z+d6d.�Z,d6d/�Z-d0�Z.d1�Z/dS)7raGeneric 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��|rt|��nd|_i|_i|_d|_|���dS�N)�set�skip�breaks�fncache�frame_returning�_load_breaks)�selfrs  r�__init__zBdb.__init__sF��!%�/�C��I�I�I�4��	�������#����������rc��|d|dd�zdzkr|S|j�|��}|sHtj�|��}tj�|��}||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 "<stdin>", generated in interactive
        mode, are returned unchanged.
        �<�����>)r�get�os�path�abspath�normcase)r�filename�canonics   rr'zBdb.canonic's|���s�X�a��d�^�+�c�1�1�1��O��,�"�"�8�,�,���	-��g�o�o�h�/�/�G��g�&�&�w�/�/�G�%,�D�L��"��rc�p�ddl}|���d|_|�dd��dS)z5Set values of attributes as ready to start debugging.rN)�	linecache�
checkcache�botframe�
_set_stopinfo)rr)s  r�resetz	Bdb.reset8sC��������������
����4��&�&�&�&�&rc��|jrdS|dkr|�|��S|dkr|�||��S|dkr|�||��S|dkr|�||��S|dkr|jS|dkr|jS|dkr|jSt
d	t|����|jS)
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:)�quitting�
dispatch_line�
dispatch_call�dispatch_return�dispatch_exception�trace_dispatch�print�repr)r�frame�event�args    rr;zBdb.trace_dispatch?s���0�=�	��F��F�?�?��%�%�e�,�,�,��F�?�?��%�%�e�S�1�1�1��H����'�'��s�3�3�3��K����*�*�5�#�6�6�6��H����&�&��M�!�!��&�&��J����&�&�
�:�D��K�K�H�H�H��"�"rc��|�|��s|�|��r#|�|��|jrt�|jS)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_liner6rr;�rr>s  rr7zBdb.dispatch_linejsR���>�>�%� � �	,�D�O�O�E�$:�$:�	,��N�N�5�!�!�!��}�+�G�m��"�"rc�(�|j�|j|_|jS|�|��s|�|��sdS|jr|jjtzr|jS|�	||��|j
rt�|jS)aInvoke 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_backr;rB�break_anywhere�	stopframe�f_code�co_flags�GENERATOR_AND_COROUTINE_FLAGS�	user_callr6r�rr>r@s   rr8zBdb.dispatch_callvs����=� �!�L�D�M��&�&����u�%�%�	��)<�)<�U�)C�)C�	��F��>�	'�e�l�3�6S�S�	'��&�&����u�c�"�"�"��=�'��-��"�"rc�h�|�|��s||jkr�|jr|jjt
zr|jS	||_|�||��d|_n#d|_wxYw|j	rt�|j|ur!|jdkr|�dd��|jS)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)
rB�returnframerIrJrKrLr;r�user_returnr6r�
stoplinenor,rNs   rr9zBdb.dispatch_return�s����>�>�%� � �	/�E�T�-=�$=�$=��~�
+�%�,�"7�:W�"W�
+��*�*�
,�',��$�� � ���,�,�,�'+��$�$��t��$�+�+�+�+��}�+�G�m��~��&�&�4�?�b�+@�+@��"�"�4��.�.�.��"�"s�A)�)	A2c��|�|��rP|jjtzr|dtur|d�$|�||��|jrt�nc|jr\||jurS|jjjtzr:|dttfvr$|�||��|jrt�|j
S)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�)rBrJrKrL�
StopIteration�user_exceptionr6rrI�
GeneratorExitr;rNs   rr:zBdb.dispatch_exception�s����>�>�%� � �	,��L�)�,I�I�
0��A��-�/�/�C��F�N��#�#�E�3�/�/�/��=�/��-��
�n�	,��d�n�!<�!<��N�)�2�5R�R�"=���F�}�m�<�<�<�����s�+�+�+��}�+�G�m��"�"rc�R�|�dS|jD]}tj||��rdS�dS)z4Return True if module_name matches any skip pattern.NFT)r�fnmatch)r�module_name�patterns   r�is_skipped_modulezBdb.is_skipped_module�sC�����5��y�	�	�G���{�G�4�4�
��t�t�
��urc���|jr/|�|j�d����rdS||jur|jdkrdS|j|jkS|jsdSdS)z>Return True if frame is below the starting frame in the stack.r
FrT)rr\�	f_globalsr!rIrR�f_linenorEs  rrBz
Bdb.stop_here�s{���9�	��%�%�e�o�&9�&9�*�&E�&E�F�F�	��5��D�N�"�"���"�$�$��u��>�T�_�4�4��~�	��4��urc�h�|�|jj��}||jvrdS|j}||j|vr|jj}||j|vrdSt
|||��\}}|r>|j|_|r.|j	r'|�
t|j����dSdS)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'rJ�co_filenamerr_�co_firstlineno�	effective�number�	currentbp�	temporary�do_clear�str)rr>r&�lineno�bp�flags      rrCzBdb.break_here�s����<�<��� 8�9�9���4�;�&�&��5�������X�.�.�.��\�0�F��T�[��2�2�2��u��x���7�7�
��T�
�	��Y�D�N��
.���
.��
�
�c�"�)�n�n�-�-�-��4��5rc� �td���)zlRemove temporary breakpoint.

        Must implement in derived classes or get NotImplementedError.
        z)subclass of bdb must implement do_clear())�NotImplementedError)rr@s  rrgzBdb.do_clear�s��
"�"M�N�N�Nrc�N�|�|jj��|jvS)zEReturn True if there is any breakpoint for frame's filename.
        )r'rJrarrEs  rrHzBdb.break_anywhere�s"���|�|�E�L�4�5�5���D�Drc��dS)z&Called if we might stop in a function.Nr)rr>�
argument_lists   rrMz
Bdb.user_call����rc��dS)z'Called when we stop or break at a line.NrrEs  rrDz
Bdb.user_linerqrc��dS)z&Called when a return trap is set here.Nr)rr>�return_values   rrQzBdb.user_returnrqrc��dS)z$Called when we stop on an exception.Nr)rr>�exc_infos   rrVzBdb.user_exceptionrqrrc�>�||_||_d|_||_dS)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)rIrPr6rR)rrIrPrRs    rr,zBdb._set_stopinfos'��#���&�����
�%����rc�L�|�
|jdz}|�|||��dS)zxStop when the line with the lineno greater than the current one is
        reached or when returning from current frame.Nr)r_r,)rr>ris   r�	set_untilz
Bdb.set_until$s3���>��^�a�'�F����5�%��0�0�0�0�0rc��|jr!|jj}|r|js|j|_|�dd��dS)zStop after one line of code.N)rrG�f_tracer;r,)r�caller_frames  r�set_stepzBdb.set_step,sS����	;��/�6�L��
;�L�$8�
;�'+�':��$����4��&�&�&�&�&rc�2�|�|d��dS)z2Stop on the next line in or below the given frame.N)r,rEs  r�set_nextzBdb.set_next8s�����5�$�'�'�'�'�'rc��|jjtzr|�|dd��dS|�|j|��dS)z)Stop when returning from the given frame.Nr)rJrKrLr,rGrEs  r�
set_returnzBdb.set_return<sQ���<� �#@�@�	4����u�d�B�/�/�/�/�/����u�|�U�3�3�3�3�3rc��|�tj��j}|���|r|j|_||_|j}|�|���tj|j��dS)znStart debugging from frame.

        If frame is not specified, debugging starts from caller's frame.
        N)	�sys�	_getframerGr-r;r{r+r}�settracerEs  r�	set_tracez
Bdb.set_traceCsv��
�=��M�O�O�*�E��
�
�����	!� �/�E�M�!�D�M��L�E��	!�	
�
�
������T�(�)�)�)�)�)rc���|�|jdd��|jsMtjd��tj��j}|r!||jur|`|j}|r||ju�dSdSdSdSdS)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�rGr{rEs  r�set_continuezBdb.set_continueRs���	
���4�=�$��3�3�3��{�	%��L������M�O�O�*�E��
%�E���6�6��M�����
%�E���6�6�6�6�		%�	%�
%�
%�
%�
%�6�6rc�b�|j|_d|_d|_t	jd��dS)zuSet quitting attribute to True.

        Raises BdbQuit exception in the next call to a dispatch_*() method.
        NT)r+rIrPr6r�r��rs r�set_quitzBdb.set_quitas2��
���������
���T�����rc�r�|j�|g��}||vr|�|��dSdS)z/Add breakpoint to breaks, if not already there.N)r�
setdefault�append)rr&ri�
bp_linenoss    r�_add_to_breakszBdb._add_to_breaksrsF���[�+�+�H�b�9�9�
���#�#����f�%�%�%�%�%�$�#rFc���|�|��}ddl}|�||��}|sd||fzS|�||��t	|||||��}dS)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)	rr&rirf�cond�funcnamer)r/rjs	         r�	set_breakz
Bdb.set_breakxs���<�<��)�)������� � ��6�2�2���	D�.�(�F�1C�C�C����H�f�-�-�-�
��&�)�T�8�
D�
D���trc�z�tj���D]\}}|�||���dS)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&ris   rrzBdb._load_breaks�sJ��#-�"3�"8�"8�":�":�	2�	2��X�v�����&�1�1�1�1�	2�	2rc��||ftjvr |j|�|��|j|s
|j|=dSdS)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)rr�r�remover�s   r�
_prune_breakszBdb._prune_breaks�s[��
�f��Z�%6�6�6��K��!�(�(��0�0�0��{�8�$�	&���H�%�%�%�	&�	&rc�
�|�|��}||jvrd|zS||j|vrd||fzStj||fdd�D]}|����|�||��dS)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'rrr��deleteMer�)rr&rirjs    r�clear_breakzBdb.clear_break�s���
�<�<��)�)���4�;�&�&�3�h�>�>����X�.�.�.�4��&�7I�I�I��#�H�f�$4�5�a�a�a�8�	�	�B��K�K�M�M�M�M����8�V�,�,�,��trc���	|�|��}n&#t$r}t|��cYd}~Sd}~wwxYw|���|�|j|j��dS)zxDelete a breakpoint by its index in Breakpoint.bpbynumber.

        If arg is invalid, return an error message.
        N)�get_bpbynumber�
ValueErrorrhr�r��filer/)rr@rj�errs    r�clear_bpbynumberzBdb.clear_bpbynumber�s|��
	��$�$�S�)�)�B�B���	�	�	��s�8�8�O�O�O�O�O�O�����	����
���
�
�
����2�7�B�G�,�,�,��ts��
;�6�;�;c���|�|��}||jvrd|zS|j|D]/}tj||f}|D]}|�����0|j|=dS)z`Delete all breakpoints in filename.

        If none were set, return an error message.
        r�N)r'rrr�r�)rr&r/�blistrjs     r�clear_all_file_breakszBdb.clear_all_file_breaks�s���
�<�<��)�)���4�;�&�&�3�h�>�>��K��)�	�	�D��%�h��n�5�E��
�
�����
�
�
�
�
��K��!��trc�p�|jsdStjD]}|r|����i|_dS)z]Delete all existing breakpoints.

        If none were set, return an error message.
        zThere are no breakpointsN)rr�
bpbynumberr�)rrjs  r�clear_all_breakszBdb.clear_all_breaks�sH��
�{�	.�-�-��'�	�	�B��
����
�
�
������trc��|std���	t|��}n!#t$rtd|z��d�wxYw	tj|}n!#t$rtd|z��d�wxYw|�td|z���|S)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��intrr��
IndexError)rr@rdrjs    rr�zBdb.get_bpbynumber�s����	;��9�:�:�:�	Q���X�X�F�F���	Q�	Q�	Q��?�#�E�F�F�D�P�	Q����	U��&�v�.�B�B���	U�	U�	U��@�6�I�J�J�PT�T�	U����
�:��<�v�E�F�F�F��	s�#�A�A�A6c�\�|�|��}||jvo||j|vS)z9Return True if there is a breakpoint for filename:lineno.�r'rr�s   r�	get_breakz
Bdb.get_break�s6���<�<��)�)���4�;�&�,��d�k�(�+�+�	,rc��|�|��}||jvr#||j|vrtj||fpgS)znReturn all breakpoints for filename:lineno.

        If no breakpoints are set, return an empty list.
        )r'rrr�r�s   r�
get_breakszBdb.get_breaks�sU��
�<�<��)�)���4�;�&�0��d�k�(�+�+�0���h��.�/�6�35�	6rc�\�|�|��}||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_breaks�s4��
�<�<��)�)���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}|�/|�||jf��||jurn	|j}|�/|���tdt|��dz
��}|�*|�|j|j	f��|j}|�*|� 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.
        Nrr)
�tb_frame�tb_nextr�r_r+rG�reverse�max�len�	tb_lineno)r�f�t�stack�is     r�	get_stackz
Bdb.get_stacks������	���q����	�A��m��L�L�!�Q�Z��)�)�)��D�M�!�!����A�	�m�
	�
�
������3�u�:�:��>�"�"���m��L�L�!�*�a�k�2�3�3�3��	�A��m�
�9��A�s�5�z�z�A�~�&�&�A��a�x�r�: c��ddl}ddl}|\}}|�|jj��}|�d|�d�}|jjr||jjz
}n|dz
}|dz
}d|jvr*|jd}	|dz
}||�|	��z
}|�9|�|||j	��}
|
r|||
�
��zz
}n||�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 '<lambda>', the input arguments, the return value, and the
        line of code (if it exists).

        rN�(�)z<lambda>z()�
__return__z->zWarning: lineno is None)r)�reprlibr'rJra�co_name�f_localsr=r�r^�strip)r�frame_lineno�lprefixr)r�r>rir&�s�rvr/s           r�format_stack_entryzBdb.format_stack_entry's��	"�!�!�!�!�!�!�!�$�
��v��<�<��� 8�9�9�� ���&�&�&�)���<��	�
���%�%�A�A�
��O�A�	�T�	���5�>�)�)����-�B�
��I�A�
����b�!�!�!�A����$�$�X�v�u��G�G�D��
,��W�t�z�z�|�|�+�+���
�G�4�4�4�4�A��rc��|�ddl}|j}|�|}|���t|t��rt|dd��}t
j|j��	t|||��n#t$rYnwxYwd|_t
jd��dS#d|_t
jd��wxYw)z�Debug a statement executed via the exec() function.

        globals defaults to __main__.dict; locals defaults to globals.
        Nrz<string>�execT)�__main__�__dict__r-�
isinstancerh�compiler�r�r;r�rr6)r�cmd�globals�localsr�s     r�runzBdb.runIs���
�?��O�O�O��'�G��>��F��
�
�����c�3���	3��#�z�6�2�2�C���T�(�)�)�)�	���g�v�&�&�&�&���	�	�	��D�	����!�D�M��L��������!�D�M��L��������s*�&A8�7B%�8
B�B%�B�B%�%Cc�t�|�ddl}|j}|�|}|���tj|j��	t
|||��d|_tjd��S#t$rYnwxYw	d|_tjd��dS#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�r;�evalr6r)r�exprr�r�r�s     r�runevalzBdb.runeval_s���
�?��O�O�O��'�G��>��F��
�
������T�(�)�)�)�	���g�v�.�.�!�D�M��L�������	�	�	�	��D�	����� �D�M��L��������!�D�M��L��������s$�A,�,
A9�6B�8A9�9B�B7c�4�|�|||��dS)z.For backwards-compatibility.  Defers to run().N)r�)rr�r�r�s    r�runctxz
Bdb.runctxss ��	
����g�v�&�&�&�&�&rc��|���tj|j��d}	||i|��}n#t$rYnwxYwd|_tjd��n #d|_tjd��wxYw|S)zWDebug a single function call.

        Return the result of the function call.
        NT)r-r�r�r;rr6)r�func�args�kwds�ress     r�runcallzBdb.runcallzs���
	
�
�
������T�(�)�)�)���	��$��%��%�%�C�C���	�	�	��D�	����!�D�M��L�������!�D�M��L����������
s&�:�A&�
A�A&�A�A&�&Br)r�FNN)r��NN)0r
rrr
rr'r-r;r7r8r9r:r\rBrCrgrHrMrDrQrVr,ryr}rr�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrs����������������"'�'�'�)#�)#�)#�V
#�
#�
#�#�#�#�,#�#�#�,#�#�#�>���
�
�
����6O�O�O�E�E�E�
�
�
�
�
�
�
�
�
�
�
�
�%�%�%�%�"1�1�1�1�
'�
'�
'�(�(�(�4�4�4�
*�
*�
*�
*�
%�
%�
%����"&�&�&�AE������ 	2�	2�	2�&�&�&����"���
�
�
�������(,�,�,�6�6�6�	�	�	�������.����D����,����('�'�'�����rrc�F�t�����dS)z<Start debugging with a Bdb instance from the caller's frame.N)rr�rrrr�r��s���E�E�O�O�����rc�d�eZdZdZdZiZdgZd
d�Zed���Z	d�Z
d�Zd	�Zdd
�Z
d�Zd�ZdS)ra�Breakpoint class.

    Implements temporary breakpoints, ignore counts, disabling and
    (re)-enabling, and conditionals.

    Breakpoints are indexed by number through bpbynumber and by
    the (file, line) tuple using bplist.  The former points to a
    single instance of class Breakpoint.  The latter points to a
    list of such instances since there may be more than one
    breakpoint per line.

    When creating a breakpoint, its associated filename should be
    in canonical form.  If funcname is defined, a breakpoint hit will be
    counted when the first line of that function is executed.  A
    conditional breakpoint always counts a hit.
    rNFc�|�||_d|_||_||_||_||_d|_d|_d|_tj
|_txj
dz
c_
|j�
|��||f|jvr$|j||f�
|��dS|g|j||f<dS)NTrr)r��func_first_executable_liner�r/rfr��enabled�ignore�hitsr�nextrdr�r�r�)rr�r/rfr�r�s      rrzBreakpoint.__init__�s��� ��
�*.��'���	���	�"�����	���������	� �o������1��������t�$�$�$��$�<�4�;�&�&��K��d�
�#�*�*�4�0�0�0�0�0�'+�f�D�K��d�
�#�#�#rc�P�dt_it_dgt_dS)Nr)rr�r�r�rrr�clearBreakpointszBreakpoint.clearBreakpoints�s!���
���
��!%��
���rc��|j|jf}d|j|j<|j|�|��|j|s
|j|=dSdS)z�Delete the breakpoint from the list associated to a file:line.

        If it is the last breakpoint in that position, it also deletes
        the entry for the file:line.
        N)r�r/r�rdr�r�)r�indexs  rr�zBreakpoint.deleteMe�sd����D�I�&��'+�����$���E��!�!�$�'�'�'��{�5�!�	#���E�"�"�"�	#�	#rc��d|_dS)zMark the breakpoint as enabled.TN�r�r�s r�enablezBreakpoint.enable�s
������rc��d|_dS)z Mark the breakpoint as disabled.FNr�r�s r�disablezBreakpoint.disable�s
������rc�h�|�tj}t|���|���dS)z�Print the output of bpformat().

        The optional out argument directs where the output is sent
        and defaults to standard output.
        N)r�)r��stdoutr<�bpformat)r�outs  r�bpprintzBreakpoint.bpprint�s1���;��*�C�
�d�m�m�o�o�C�(�(�(�(�(�(rc��|jrd}nd}|jr|dz}n|dz}d|j||j|jfz}|jr
|d|j��z
}|jr|d|jfzz
}|jr|jdkrd	}nd
}|d|j|fzz
}|S)z�Return a string with information about the breakpoint.

        The information includes the breakpoint number, temporary
        status, file:line position, break condition, number of times to
        ignore, and number of times hit.

        zdel  zkeep zyes  zno   z%-4dbreakpoint   %s at %s:%dz
	stop only if z
	ignore next %d hitsrr��z"
	breakpoint already hit %d time%s)rfr�rdr�r/r�r�r�)r�disp�ret�sss    rr�zBreakpoint.bpformat�s����>�	��D�D��D��<�	"��'�>�D�D��'�>�D�,���T�04�	�4�9�0F�F���9�	8��C�D�I�I�7�7�C��;�	>��,���~�=�=�C��9�	L��y�1�}�}�������9�T�Y��O�K�K�C��
rc�6�d|j�d|j�d|j��S)z1Return a condensed description of the breakpoint.zbreakpoint z at �:)rdr�r/r�s r�__str__zBreakpoint.__str__s!���+/�;�;�;��	�	�	�4�9�9�M�Mrr�r)r
rrr
r�r�r�r�staticmethodr�r�r�r�rr�rrrrrr�s���������(
�D�
�F���J�-�-�-�-�(�'�'��\�'�
#�#�#�������)�)�)�)����<N�N�N�N�Nrrc��|js|j|jkrdSdS|jj|jkrdS|js|j|_|j|jkrdSdS)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�r/r_rJr�r�)�br>s  r�
checkfuncnamerss��
�:���6�U�^�#�#��5��t�
�|��q�z�)�)��u�
�'�6�',�~��$��#�u�~�5�5��u��4rc��tj||f}|D]�}|js�
t||��s�|xjdz
c_|js"|jdkr|xjdzc_�N|dfcS	t|j|j|j	��}|r"|jdkr|xjdzc_n|dfcS��#|dfcYcSxYwdS)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.
    rrTFr�)
rr�r�rr�r�r�r�r^r�)r�r/r>�	possiblesr�vals      rrcrc+s���!�$��*�-�I�
�!"�!"���y�	���Q��&�&�	��	���!�����v�	"��x�!�|�|����A�
�����4�y� � � �

"��1�6�5�?�E�N�C�C���)��x�!�|�|����A�
����!"�4�y�(�(�(���
"��5�z�!�!�!�!�!�����<s
�,AB1�1B;c�&�eZdZd�Zd�Zd�Zd�ZdS)�Tdbc�H�|jj}|sd}td||��dS)N�???z+++ call)rJr�r<)rr>r��names    rrMz
Tdb.user_callas.���|�#���!�E�T�
�j�$��%�%�%�%�%rc	��ddl}|jj}|sd}|�|jj��}|�||j|j��}td||j|d|�	����dS)Nrrz+++r)
r)rJr�r'rar�r_r^r<r�)rr>r)r�fnr/s      rrDz
Tdb.user_linees{�������|�#���!�E�T�
�\�\�%�,�2�
3�
3��� � ��U�^�U�_�E�E��
�e�R����s�D�J�J�L�L�A�A�A�A�Arc�&�td|��dS)Nz
+++ return�r<)rr>�retvals   rrQzTdb.user_returnls��
�l�F�#�#�#�#�#rc�N�td|��|���dS)Nz
+++ exception)r<r�)rr>�	exc_stuffs   rrVzTdb.user_exceptionns*��
�o�y�)�)�)��������rN)r
rrrMrDrQrVrrrrr`sS������&�&�&�B�B�B�$�$�$�����rrc�l�td|d��t|dz��}td|��dS)Nzfoo(r��
zbar returned)r<�bar)�n�xs  r�foor!rs9��	�&�!�S�����A�b�D�	�	�A�	�.�!�����rc�.�td|d��|dzS)Nzbar(r�rTr)�as rrrws��	�&�!�S�����Q�3�Jrc�L�t��}|�d��dS)Nzimport bdb; bdb.foo(10))rr�)r�s r�testr%{s$�����A��E�E�
#�$�$�$�$�$r)r
rYr�r"�inspectrrr�__all__rL�	Exceptionrrr�rrrcrr!rr%rrr�<module>r)s���������
�
�
�
�	�	�	�	�B�B�B�B�B�B�B�B�B�B�
*�
*�
*�� ,�|� ;�>P� P��+�+�+�+�+�i�+�+�+�x	�x	�x	�x	�x	�x	�x	�x	�v���
uN�uN�uN�uN�uN�uN�uN�uN�t���@0�0�0�j�����#����$���
���%�%�%�%�%r

Zerion Mini Shell 1.0