Hacked By AnonymousFox

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

�

c��f����f�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZGd�de��Zgd�Zd�Zd�ZGd	�d
e��ZGd�de��ZGd
�de��ZdZGd�dejej��Ze�Fgd�Z e D].Z!ee"ede!z��j�#��dzz
Z�/eej$jz
Z[ [!d#d�Z%d#d�Z&d�Z'd�Z(dd�d�Z)d$d�Z*d�Z+dZ,d�Z-d�Z.d Z/d!�Z0e1d"krddl2Z2e2j0��dSdS)%a�	
The Python Debugger Pdb
=======================

To use the debugger in its simplest form:

        >>> import pdb
        >>> pdb.run('<a statement>')

The debugger's prompt is '(Pdb) '.  This will stop in the first
function call in <a statement>.

Alternatively, if a statement terminated with an unhandled exception,
you can use pdb's post-mortem facility to inspect the contents of the
traceback:

        >>> <a statement>
        <exception traceback>
        >>> import pdb
        >>> pdb.pm()

The commands recognized by the debugger are listed in the next
section.  Most can be abbreviated as indicated; e.g., h(elp) means
that 'help' can be typed as 'h' or 'help' (but not as 'he' or 'hel',
nor as 'H' or 'Help' or 'HELP').  Optional arguments are enclosed in
square brackets.  Alternatives in the command syntax are separated
by a vertical bar (|).

A blank line repeats the previous command literally, except for
'list', where it lists the next 11 lines.

Commands that the debugger doesn't recognize are assumed to be Python
statements and are executed in the context of the program being
debugged.  Python statements can also be prefixed with an exclamation
point ('!').  This is a powerful way to inspect the program being
debugged; it is even possible to change variables or call functions.
When an exception occurs in such a statement, the exception name is
printed but the debugger's state is not changed.

The debugger supports aliases, which can save typing.  And aliases can
have parameters (see the alias help entry) which allows one a certain
level of adaptability to the context under examination.

Multiple commands may be entered on a single line, separated by the
pair ';;'.  No intelligence is applied to separating the commands; the
input is split at the first ';;', even if it is in the middle of a
quoted string.

If a file ".pdbrc" exists in your home directory or in the current
directory, it is read in and executed as if it had been typed at the
debugger prompt.  This is particularly useful for aliases.  If both
files exist, the one in the home directory is read first and aliases
defined there can be overridden by the local file.  This behavior can be
disabled by passing the "readrc=False" argument to the Pdb constructor.

Aside from aliases, the debugger is not directly programmable; but it
is implemented as a class from which you can derive your own debugger
class, which you can make as fancy as you like.


Debugger commands
=================

�N)�Unionc��eZdZdZdS)�RestartzBCauses a debugger to be restarted for the debugged python program.N)�__name__�
__module__�__qualname__�__doc__���*/opt/alt/python311/lib64/python3.11/pdb.pyrrZs������L�L��Drr)	�run�pm�Pdb�runeval�runctx�runcall�	set_trace�post_mortem�helpc�Z�tjdtj|��z��}	tj|��}n#t
$rYdSwxYw|5t
|d���D]-\}}|�|��r|||fccddd��S�.	ddd��n#1swxYwYdS)Nzdef\s+%s\s*[(]�)�start)�re�compile�escape�tokenize�open�OSError�	enumerate�match)�funcname�filename�cre�fp�lineno�lines      r�
find_functionr'as1��
�*�&���8�)<�)<�<�
=�
=�C��
�]�8�
$�
$���������t�t�����
�2�2�%�b��2�2�2�	2�	2�L�F�D��y�y����
2���6�1�1�1�2�2�2�2�2�2�2�2�
2�	2�2�2�2�2�2�2�2�2�2�2�2����2�2�2�2��4s)�A�
A�
A�2B �B � B$�'B$c��ttj|����}|���|D]\}}||kr|cS�dS�Nr)�list�dis�findlinestarts�reverse)�code�lasti�
linestarts�ir%s     r�lasti2linenor2ns[���c�(��.�.�/�/�J����������	��6��A�:�:��M�M�M���1rc��eZdZdZd�ZdS)�_rstrz#String that doesn't quote its repr.c��|S�Nr
��selfs r�__repr__z_rstr.__repr__ys���rN)rrrr	r9r
rrr4r4ws)������-�-�����rr4c�f��eZdZ�fd�Zd�Zed���Zed���Zed���Z�xZ	S)�
_ScriptTargetc���t���|tj�|����}||_|Sr6)�super�__new__�os�path�realpath�orig)�cls�val�res�	__class__s   �rr>z_ScriptTarget.__new__~s8����g�g�o�o�c�2�7�#3�#3�C�#8�#8�9�9������
rc��tj�|��s*td|jd��tjd��tj�|��r*td|jd��tjd��tj�|��t
jd<dS)NzError:zdoes not existrzis a directoryr)	r?r@�exists�printrB�sys�exit�isdir�dirnamer7s r�checkz_ScriptTarget.check�s����w�~�~�d�#�#�	��(�D�I�'7�8�8�8��H�Q�K�K�K�
�7�=�=����	��(�D�I�'7�8�8�8��H�Q�K�K�K��g�o�o�d�+�+������rc��|Sr6r
r7s rr"z_ScriptTarget.filename�s���rc�2�td|td���S)N�__main__)r�__file__�__builtins__�__spec__)�dictrSr7s r�	namespacez_ScriptTarget.namespace�s%�����%��	
�
�
�	
rc��tj|��5}d|����d|�d�cddd��S#1swxYwYdS)Nz
exec(compile(z, z
, 'exec')))�io�	open_code�read)r8r$s  rr.z_ScriptTarget.code�s���
�\�$�
�
�	E�2�D�2�7�7�9�9�D�D�$�D�D�D�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E�	E�	Es�=�A�A)
rrrr>rN�propertyr"rVr.�
__classcell__)rFs@rr;r;}s�������������	,�	,�	,�����X���
�
��X�
��E�E��X�E�E�E�E�Err;c��eZdZd�Zejd���Zed���Zed���Z	ed���Z
ed���ZdS)�
_ModuleTargetc��	|jdS#t$r1}td|����tjd��Yd}~dSd}~wt
$r+t
j��tjd��YdSwxYw)Nz
ImportError: r)�_details�ImportErrorrIrJrK�	Exception�	traceback�	print_exc)r8�es  rrNz_ModuleTarget.check�s���	��M�M�M�M���	�	�	��%�!�%�%�&�&�&��H�Q�K�K�K�K�K�K�K�K�K������	�	�	���!�!�!��H�Q�K�K�K�K�K�K�	���s��
A9�&A�4A9�8A9c�4�ddl}|�|��Sr))�runpy�_get_module_details)r8rgs  rr`z_ModuleTarget._details�s�������(�(��.�.�.rc��|jjSr6)r.�co_filenamer7s rr"z_ModuleTarget.filename�s
���y�$�$rc��|j\}}}|Sr6�r`�r8�name�specr.s    rr.z_ModuleTarget.code�����=���d�D��rc��|j\}}}|Sr6rlrms    r�_specz_ModuleTarget._spec�rprc���tdtj�tj�|j����|jj|jj|jt���S)NrQ)rrR�__package__�
__loader__rTrS)
rUr?r@�normcase�abspathr"rr�parent�loaderrSr7s rrVz_ModuleTarget.namespace�sW�����W�%�%�b�g�o�o�d�m�&D�&D�E�E��
�)��z�(��Z�%�

�
�
�	
rN)rrrrN�	functools�cached_propertyr`r[r"r.rrrVr
rrr^r^�s������������/�/���/��%�%��X�%�����X������X���
�
��X�
�
�
rr^z
-> c��eZdZdZ		dXd�Zd�Zd�Zd�Zd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeZdYd�Zd�ZeZeZ eZ!d �Z"eZ#d!�Z$d"�Z%d#�Z&eZ'd$�Z(eZ)d%�Z*eZ+d&�Z,eZ-d'�Z.e.Z/eZ0eZ1d(�Z2e2Z3e2Z4d)�Z5d*�Z6e6Z7d+�Z8e8Z9d,�Z:e:Z;d-�Z<e<Z=d.�Z>e>Z?d/�Z@e@ZAd0�ZBeBZCd1�ZDeDxZEZFd2�ZGeGZHd3�ZIeZJd4�ZKeKZLeKZMd5�ZNd6�ZOeOZPd7�ZQeQZRd8�ZSdZd9�ZTd:�ZUd;�ZVd<�ZWd=�ZXd>�ZYeZZeZ[eZ\d?�Z]e]Z^d@�Z_e_Z`dA�ZaeZbd[dC�ZcdD�ZdeZedE�ZfeZgdF�ZhdG�ZidH�ZjdI�ZkdJ�ZldK�ZmgdL�ZndM�ZoepfdN�ZqdO�ZrerZsdP�ZtdQ�ZudR�ZvdSewexeyffdT�ZzdUe{fdV�Z|dW�Z}dS)\rN�tabFTc�r�tj�||���tj�||||��tjd��|rd|_d|_i|_	i|_
d|_d|_i|_
	ddl}|�d��n#t $rYnwxYwd|_||_g|_|r�	t)t*j�d��d	�
��5}|j�|��ddd��n#1swxYwYn#t2$rYnwxYw	t)dd	�
��5}|j�|��ddd��n#1swxYwYn#t2$rYnwxYwi|_i|_i|_d|_d|_dS)N)�skipzpdb.Pdbrz(Pdb) �Fz 	
`@#$%^&*()=+[{]}\|;:'",<>?z~/.pdbrczutf-8)�encodingz.pdbrc)�bdb�Bdb�__init__�cmd�CmdrJ�audit�use_rawinput�prompt�aliases�
displaying�
mainpyfile�_wait_for_mainpyfile�	tb_lineno�readline�set_completer_delimsra�allow_kbdint�nosigint�rcLinesrr?r@�
expanduser�extendr�commands�commands_doprompt�commands_silent�commands_defining�
commands_bnum)	r8�completekey�stdin�stdoutrr��readrcr��rcFiles	         rr�zPdb.__init__�sk�������D��)�)�)������{�E�6�:�:�:��	�)�����	"� !�D��������������$)��!����	��O�O�O��)�)�*M�N�N�N�N���	�	�	��D�	����!��� ��
�����
	�
��"�'�,�,�Z�8�8�7�K�K�K�0�v��L�'�'��/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0����
�
�
���
����
��(�W�5�5�5�0���L�'�'��/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0����
�
�
���
������
�!#���!���!&���!����s~�B&�&
B3�2B3�.D/�<D#�D/�#D'�'D/�*D'�+D/�/
D<�;D<�F�E8�,F�8E<�<F�?E<�F�
F�Fc��|jrt�|�d��|���|�|��dS)Nz-
Program interrupted. (Use 'cont' to resume).)r��KeyboardInterrupt�message�set_stepr)r8�signum�frames   r�sigint_handlerzPdb.sigint_handler	sK����	$�#�#����E�F�F�F��
�
�������u�����rc�l�tj�|��|���dSr6)r�r��reset�forgetr7s rr�z	Pdb.resets'����
�
�d�������
�
�
�
�
rc�p�d|_g|_d|_d|_|j���dSr))r%�stack�curindex�curframer��clearr7s rr�z
Pdb.forgets8�������
���
���
���������rc��|���|�||��\|_|_|r7t	|jj|j��}||j|j<|j	}|�7|j|jd|_
|j
j|_|j
rd�|j
D��|_g|_
dSdS)Nrc��g|]?}|����|����d���=|��@S)�#)�strip�
startswith)�.0r&s  r�
<listcomp>zPdb.setup.<locals>.<listcomp>,sT�������:�:�<�<��(,�
�
���(?�(?��(D�(D�����r)r��	get_stackr�r�r2�tb_frame�f_code�tb_lastir��tb_nextr��f_locals�curframe_localsr��cmdqueue)r8�f�tbr%s    r�setupz	Pdb.setups������
�
�
�$(�N�N�1�b�$9�$9�!��
�D�M��	�"�"�+�"4�b�k�B�B�F�*0�D�N�2�;�'���B�
�	��
�4�=�1�!�4��
� $�}�5����<�	���!%�����D�M��D�L�L�L�	�	rc��|jrdS|�|��r-|�d��|�|d��dSdS)znThis method is called when there is the remote possibility
        that we ever need to stop in this function.Nz--Call--)r��	stop_herer��interaction)r8r��
argument_lists   r�	user_callz
Pdb.user_call4s`���$�	��F��>�>�%� � �	*��L�L��$�$�$����U�D�)�)�)�)�)�	*�	*rc���|jr<|j|�|jj��ks|jdkrdSd|_|�|��r|�|d��dSdS)z;This function is called when we stop or break at this line.rNF)r�r��canonicr�rj�f_lineno�bp_commandsr�)r8r�s  r�	user_linez
Pdb.user_line=s����$�	.���4�<�<���0H�#I�#I�I�I��>�Q�&�&���(-�D�%����E�"�"�	*����U�D�)�)�)�)�)�	*�	*rc���t|dd��r�|j|jvr�|j}d|_|j}|�|d��|j|D]}|�|���||_|j|s%|�|j|j	��|j
|r|���|���dSdS)z�Call every command that was set for the current active breakpoint
        (if there is one).

        Returns True if the normal interaction function must be called,
        False otherwise.�	currentbpFrNr)
�getattrr�r��lastcmdr��onecmdr��print_stack_entryr�r�r��_cmdloopr�)r8r�r��lastcmd_backr&s     rr�zPdb.bp_commandsGs����4��e�,�,�	��~���.�.���I��D�N��<�L��J�J�u�d�#�#�#��
�i�0�
"�
"�����D�!�!�!�!�'�D�L��'�	�2�
B��&�&�t�z�$�-�'@�A�A�A��%�i�0�
 ��
�
�����K�K�M�M�M��F��qrc��|jrdS||jd<|�d��|�|d��dS)z7This function is called when a return trap is set here.N�
__return__z
--Return--)r�r�r�r�)r8r��return_values   r�user_returnzPdb.user_return_sL���$�	��F�'3���|�$����\�"�"�"������%�%�%�%�%rc��|jrdS|\}}}||f|jd<|s|turdnd}|�|�t	j||��d�������|�||��dS)zoThis function is called if an exception occurs,
        but only if we are to stop at or just below this level.N�
__exception__z	Internal r����)r�r��
StopIterationr�rc�format_exception_onlyr�r�)r8r��exc_info�exc_type�	exc_value�
exc_traceback�prefixs       r�user_exceptionzPdb.user_exceptiongs����$�	��F�-5�*��)�]�*2�I�*=����'�&3�K�(0�M�(A�(A���HJ�	����v�v��+�H�i�@�@��D�J�J�L�L�L�N�	O�	O�	O�����
�.�.�.�.�.rc��		d|_|���d|_dS#t$r|�d��YnwxYw�K)NTFz--KeyboardInterrupt--)r��cmdloopr�r�r7s rr�zPdb._cmdloop{si��		6�
6�%)��!�������$)��!����$�
6�
6�
6����4�5�5�5�5�5�
6����		6s�"'�A	�A	c�V�|j�|j��}|r�|���D]r\}}|�|��}||urR||krL|||<|�d|�d|�||���d|�||���d����qdSdS)N�display �: z  [old: �])r��getr��items�_getval_exceptr��
_safe_repr)r8r��expr�oldvalue�newvalues     r�preloopzPdb.preloop�s����_�(�(���7�7�
��
	D�",�"2�"2�"4�"4�	
D�	
D���h��.�.�t�4�4���8�+�+��H�0D�0D�'/�J�t�$��L�L�L�"&�$�$�����$�(G�(G�(G�(G�"&�/�/�(�D�"A�"A�"A�"A�"C�D�D�D��
	D�
	D�	
D�	
Drc��tjrG	tjtjtj��dt_n#t$rYnwxYw|�||��|js%|�|j|j	��|�
��|���dSr6)r�_previous_sigint_handler�signal�SIGINT�
ValueErrorr�r�r�r�r�r�r�)r8r�rcs   rr�zPdb.interaction�s����'�	4�
4��
�f�m�S�-I�J�J�J�04��,�,���
�
�
���
����	
�
�
�5�)�$�$�$��}�	>��"�"�4�:�d�m�#<�=�=�=��
�
�������
�
�
�
�
s�)A�
A�Ac�R�|�$|�t|����dSdS)z{Custom displayhook for the exec in default(), which prevents
        assignment of the _ variable in the builtins.
        N)r��repr)r8�objs  r�displayhookzPdb.displayhook�s.��
�?��L�L��c���#�#�#�#�#��?rc�*�|dd�dkr
|dd�}|j}|jj}	t|dzdd��}tj}tj}tj}	|jt_|jt_|jt_t|||��|t_|t_|t_dS#|t_|t_|t_wxYw#|�	��YdSxYw)Nr�!�
z<stdin>�single)
r�r��	f_globalsrrJr�r�r��exec�
_error_exc)r8r&�locals�globalsr.�save_stdout�
save_stdin�save_displayhooks        r�defaultzPdb.default�s�������8�s�?�?�4����8�D��%���-�)��	��4�$�;�	�8�<�<�D��*�K���J�"���
3� �J��	�!�[��
�"&�"2����T�7�F�+�+�+�(��
�&��	�"2������)��
�&��	�"2���2�2�2�2��	��O�O���������s$�8C9�&AC�*$C9�&C6�6C9�9Dc��|���s|S|���}|d|jvr�|j|d}d}|dd�D]-}|�dt	|��z|��}|dz
}�.|�dd�|dd�����}|���}|d|jv��|ddkrq|�d��}|dkrV||d	zd����}|j�	d|��|d|��
��}|S)
z*Handle alias expansion and ';;' separator.rrN�%z%*� �aliasz;;�)r��splitr��replace�str�join�find�lstripr��insert�rstrip)r8r&�args�ii�tmpArg�marker�nexts       r�precmdz
Pdb.precmd�sQ���z�z�|�|�	��K��z�z�|�|���1�g���%�%��<��Q��(�D��B��q�r�r�(�
�
���|�|�C�#�b�'�'�M�&,�.�.���a�����<�<��c�h�h�t�A�B�B�x�&8�&8�9�9�D��:�:�<�<�D��1�g���%�%���7�g����Y�Y�t�_�_�F���{�{��F�1�H�I�I��-�-�/�/���
�$�$�Q��-�-�-��G�V�G�}�+�+�-�-���rc�z�|js tj�||��S|�|��S)z�Interpret the argument as though it had been typed in response
        to the prompt.

        Checks whether this line is typed at the normal prompt or in
        a breakpoint command list definition.
        )r�r�r�r��handle_command_def)r8r&s  rr�z
Pdb.onecmd�s9���%�	1��7�>�>�$��-�-�-��*�*�4�0�0�0rc��|�|��\}}}|sdS|dkrd|j|j<dS|dkrdS|j|j}|r|�|dz|z��n|�|��	t|d|z��}n#t$r
|j}YnwxYw|j|j	vrd|j
|j<dSdS)z8Handles one command line during command list definition.F�silentT�endr�do_)�	parseliner�r�r��appendr��AttributeErrorrr�commands_resumingr�)r8r&r��arg�cmdlist�funcs      rrzPdb.handle_command_def�s������-�-���S�$��	��5��(�?�?�7;�D� ��!3�4��5�
�E�\�\��4��-�� 2�3���	 ��N�N�3�s�7�3�;�'�'�'�'��N�N�3����	 ��4����-�-�D�D���	 �	 �	 ��<�D�D�D�	 �����=�D�2�2�2�9>�D�"�4�#5�6��4��us�B�B+�*B+c�2�t||j���dS)N��file�rIr��r8�msgs  rr�zPdb.messages��
�c���$�$�$�$�$�$rc�4�td||j���dS)Nz***r'r)r*s  r�errorz	Pdb.errors��
�e�S�t�{�+�+�+�+�+�+rc�8�|����d��rgS	|�||||��}n#t$rg}YnwxYwt	jt	j|��dz��}|D]�}tj�|��r|�	|dz���:tj�
|��r?|����d��r|�	|dz����|S)N)�:�,�*�/)�.pyz.pywr/)r��endswith�_complete_expressionrb�globrr?r@rLr �isfile�lower)r8�textr&�begidx�endidx�ret�globs�fns        r�_complete_locationzPdb._complete_location
s���:�:�<�<� � ��,�,�	��I�	��+�+�D�$���G�G�C�C���	�	�	��C�C�C�	�����	�$�+�d�+�+�c�1�2�2���	%�	%�B��w�}�}�R� � �
%��
�
�2��8�$�$�$�$������#�#�
%����
�
�(;�(;�O�(L�(L�
%��
�
�2��8�$�$�$���
s�A�A�Ac�X���fd�ttjj��D��S)Nc�|��g|]8\}}|�t|�������)t|����9Sr6)r
r�)r�r1�bpr9s   �rr�z*Pdb._complete_bpnumber.<locals>.<listcomp>$sG���?�?�?�5�1�b��>�c�!�f�f�&7�&7��&=�&=�>��A���!�>�>r)rr��
Breakpoint�
bpbynumber�r8r9r&r:r;s `   r�_complete_bpnumberzPdb._complete_bpnumber s:���?�?�?�?�I�c�n�.G�$H�$H�?�?�?�	?rc����	�|jsgSi|jj�|j�}d�vr���d���	|�d}�dd�D]}t	||��}�n#t
tf$rgcYSwxYwd��dd���dz�	��	fd�t|��D��S�fd�|�	��D��S)N�.rrr�c�P��g|]"}|��d����|z��#S)r��r�)r��n�dottedr�s  ��rr�z,Pdb._complete_expression.<locals>.<listcomp>;s2���M�M�M�1�A�L�L����4L�4L�M�F�Q�J�M�M�Mrc�>��g|]}|�����|��Sr
rJ)r�rKr9s  �rr�z,Pdb._complete_expression.<locals>.<listcomp>>s*���?�?�?�!�A�L�L��,>�,>�?�A�?�?�?r)
r�r�r�rr��KeyErrorr!r�dir�keys)
r8r9r&r:r;�nsr��partrLr�s
 `      @@rr5zPdb._complete_expression's������}�	��I�A��
�'�
@�4�+?�
@���$�;�;��Z�Z��_�_�F�
�����m��"�1�R�4�L�-�-�D�!�#�t�,�,�C�C�-���n�-�
�
�
��	�	�	�
�����X�X�f�S�b�S�k�*�*�S�0�F�M�M�M�M�M��C���M�M�M�M�@�?�?�?�r�w�w�y�y�?�?�?�?s�+A(�(A>�=A>c�^�|s"ttjj��dz
}n.	t	|��}n#|�d��YdSxYw	|�|��n0#t$r#}|�d|z��Yd}~dSd}~wwxYw||_||j	vr'|j	||j
||j|f}nd}g|j	|<d|j
|<d|j|<|j}d|_d|_
	|���np#t$rc|r1|d|j	|<|d|j
|<|d	|j|<n|j	|=|j
|=|j|=|�d
��YnwxYwd|_
||_dS#d|_
||_wxYw)a4commands [bpnumber]
        (com) ...
        (com) end
        (Pdb)

        Specify a list of commands for breakpoint number bpnumber.
        The commands themselves are entered on the following lines.
        Type a line containing just 'end' to terminate the commands.
        The commands are executed when the breakpoint is hit.

        To remove all commands from a breakpoint, type commands and
        follow it immediately with end; that is, give no commands.

        With no bpnumber argument, commands refers to the last
        breakpoint set.

        You can use breakpoint commands to start your program up
        again.  Simply use the continue command, or step, or any other
        command that resumes execution.

        Specifying any command resuming execution (currently continue,
        step, next, return, jump, quit and their abbreviations)
        terminates the command list (as if that command was
        immediately followed by end).  This is because any time you
        resume execution (even with a simple next or step), you may
        encounter another breakpoint -- which could have its own
        command list, leading to ambiguities about which list to
        execute.

        If you use the 'silent' command in the command list, the usual
        message about stopping at a breakpoint is not printed.  This
        may be desirable for breakpoints that are to print a specific
        message and then continue.  If none of the other commands
        print anything, you will see no sign that the breakpoint was
        reached.
        rz.Usage: commands [bnum]
        ...
        endNzcannot set commands: %sTFz(com) rr
z1command definition aborted, old commands restored)�lenr�rCrD�intr-�get_bpbynumberr�r�r�r�r�r�r�r�r�)r8r#�bnum�err�old_command_defs�prompt_backs      r�do_commandszPdb.do_commandsDs ��J�	��s�~�0�1�1�A�5�D�D�
��3�x�x����
��
�
�M�N�N�N�������	�����%�%�%�%���	�	�	��J�J�0�3�6�7�7�7��F�F�F�F�F�����	����"����4�=� � � $�
�d� 3� $� 6�t� <� $� 4�T� :� <��� $�� ��
�d��'+���t�$�%*���T�"��k�����!%���	&��L�L�N�N�N�N�� �
	L�
	L�
	L��
/�&6�q�&9��
�d�#�/?��/B��&�t�,�-=�a�-@��$�T�*�*��M�$�'��*�4�0��(��.��J�J�J�K�K�K�K�K�
	L����&+�D�"�%�D�K�K�K��&+�D�"�%�D�K�%�%�%�%sL�6�A�A*�*
B�4B�B�D�F�A*F	�F�F	�	F�F,rc���|s[|jrR|�d��tjjD]+}|r'|�|������,dSd}d}d}|�d��}|dkr;||dzd����}|d|����}|�	d��}d}	|dkr�|d|����}|�
|��}
|
s|�d|z��dS|
}||dzd����}	t|��}n�#t$r|�d|z��YdSwxYw	t|��}n�#t$r�	t||jj|j��}n	#|}YnxYw	t%|d	��r|j}|j}|j}	|j}|j}nO#|�|��\}
}}|
s|�d
|z��YYdS|
}	t|��}YnxYwYnwxYw|s|���}|�||��}|rz|�|||||	��}|r|�|��dS|�||��d}|�d|j|j|jfz��dSdS)
a�b(reak) [ ([filename:]lineno | function) [, condition] ]
        Without argument, list all breaks.

        With a line number argument, set a break at this line in the
        current file.  With a function name, set a break at the first
        executable line of that function.  If a second argument is
        present, it is a string specifying an expression which must
        evaluate to true before the breakpoint is honored.

        The line number may be prefixed with a filename and a colon,
        to specify a breakpoint in another file (probably one that
        hasn't been loaded yet).  The file is searched for on
        sys.path; the .py suffix may be omitted.
        z!Num Type         Disp Enb   WhereNr0rrr/z%r not found from sys.pathzBad lineno: %s�__func__zJThe specified object %r is not a function or was not found along sys.path.r�zBreakpoint %d at %s:%d) �breaksr�r�rCrD�bpformatrrr�rfind�lookupmoduler-rUr��evalr�r�r��hasattrr]�__code__�co_name�co_firstlinenorj�lineinfo�defaultFile�	checkline�	set_break�
get_breaks�numberr(r&)r8r#�	temporaryrBr"r%�cond�comma�colonr!r�r%r.�ok�lnr&rXs                 r�do_breakzPdb.do_break�sy���	��{�
4����@�A�A�A��.�3�4�4�B��4����R�[�[�]�]�3�3�3���F�����������
�
���1�9�9��u�Q�w�x�x�=�'�'�)�)�D��f�u�f�+�$�$�&�&�C��	�	�#�������A�:�:��6�E�6�{�)�)�+�+�H��!�!�(�+�+�A��
��
�
�7�(�B�C�C�C������e�A�g�h�h�-�&�&�(�(�C�
��S�������
�
�
��
�
�+�c�1�2�2�2����
����

%��S�������
%�
%�
%���� $�
� 7� $� 4�6�6�D�D����D�D�D����%��t�Z�0�0�-�#�}���=�D� $�|�H�!�0�F�#�/�H�H��%�)-���s�);�);�&�R��2����
�
�$F�HK�$L�M�M�M�����!�H� ��W�W�F�F�F������1
%����2�	*��'�'�)�)�H��~�~�h��/�/���	<��.�.��4��D�(�K�K�C��
<��
�
�3�������_�_�X�t�4�4�R�8�����5� �i���"�'�:�;�<�<�<�<�<�	<�	<s`�E�"E<�;E<�F�
I� F<�;I�<G�I�3G:�9I�:5I�/I�3I�I�Ic�P�|jjj}|dkr|jr|j}|S)zProduce a reasonable default.z<string>)r�r�rjr�)r8r"s  rrhzPdb.defaultFile�s-���=�'�3���z�!�!�d�o�!���H��rc�2�|�|d��dS)z�tbreak [ ([filename:]lineno | function) [, condition] ]
        Same arguments as break, but sets a temporary breakpoint: it
        is automatically deleted when first hit.
        rN)rs�r8r#s  r�	do_tbreakz
Pdb.do_tbreaks��
	
�
�
�c�1�����rc�D�d}|�d��}t|��dkr|d���}n0t|��dkr|d���}n|S|dkr|S|�d��}|ddkr|d=t|��dkr|S|���}t|��dkr	|d}n'|�|d��}|r|}|d}t||��}	|	p|S)	N)NNN�'rr�r�rHr8)rrTr�rhrar')
r8�
identifier�failed�idstring�id�parts�fname�itemr��answers
          rrgzPdb.lineinfos)��#���#�#�C�(�(���x�=�=�A����!��"�"�$�$�B�B�
��]�]�a�
�
��!��"�"�$�$�B�B��M�
��8�8�F�]�����
�
����8�v����a���5�z�z�Q����
�� � �"�"���u�:�:��?�?���8�D�D��!�!�%��(�+�+�A��
�����8�D��t�U�+�+�����rc�F�t|dd��}|r|jnd}tj|||��}|s|�d��dS|���}|r(|ddks|dd�dks|dd�dkr|�d	��dS|S)
z�Check whether specified line seems to be executable.

        Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
        line or EOF). Warning: testing is not comprehensive.
        r�NzEnd of filerr�rzz"""z'''zBlank or comment)r�r��	linecache�getliner�r�r-)r8r"r%r�r=r&s      rriz
Pdb.checkline,s�����j�$�/�/��#(�2����d��� ��6�5�9�9���	��L�L��'�'�'��1��z�z�|�|���	��a��C����2�A�2�h�%���D��!��H��$5�$5��J�J�)�*�*�*��1��
rc��|���}|D]p}	|�|��}|���|�d|z���E#t$r}|�|��Yd}~�id}~wwxYwdS)z�enable bpnumber [bpnumber ...]
        Enables the breakpoints given as a space separated list of
        breakpoint numbers.
        z
Enabled %sN)rrV�enabler�r�r-�r8r#rr1rBrXs      r�	do_enablez
Pdb.do_enableBs���
�y�y�{�{���	0�	0�A�
0��(�(��+�+���	�	�������\�B�.�/�/�/�/��	�
 �
 �
 ��
�
�3�������������
 ����	0�	0��A�
B�&B�Bc��|���}|D]p}	|�|��}|���|�d|z���E#t$r}|�|��Yd}~�id}~wwxYwdS)aNdisable bpnumber [bpnumber ...]
        Disables the breakpoints given as a space separated list of
        breakpoint numbers.  Disabling a breakpoint means it cannot
        cause the program to stop execution, but unlike clearing a
        breakpoint, it remains in the list of breakpoints and can be
        (re-)enabled.
        zDisabled %sN)rrV�disabler�r�r-r�s      r�
do_disablezPdb.do_disableSs����y�y�{�{���	1�	1�A�
1��(�(��+�+���
�
�������]�R�/�0�0�0�0��	�
 �
 �
 ��
�
�3�������������
 ����	1�	1r�c���|�dd��}	|d}n#t$rd}YnwxYw	|�|d�����}||_|s|�d|jz��dS|�d|jz��dS#t$r|�d��YdSt$r }|�|��Yd}~dSd}~wwxYw)a#condition bpnumber [condition]
        Set a new condition for the breakpoint, an expression which
        must evaluate to true before the breakpoint is honored.  If
        condition is absent, any existing condition is removed; i.e.,
        the breakpoint is made unconditional.
        rrNrz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.�Breakpoint number expected)	r�
IndexErrorrVr�rnr�rlr-r�)r8r#rrnrBrXs      r�do_conditionzPdb.do_conditiongs,���y�y��a� � ��	���7�D�D���	�	�	��D�D�D�	����	Q��$�$�T�!�W�]�]�_�_�5�5�B��B�G��
Q����B�R�Y�N�O�O�O�O�O����C�b�i�O�P�P�P�P�P���	5�	5�	5��J�J�3�4�4�4�4�4�4��	�	�	��J�J�s�O�O�O�O�O�O�O�O�O�����	���s)�!�0�0�-B(�(C3�
	C3�C.�.C3c�<�|���}	t|d�����}n	#d}YnxYw	|�|d�����}||_|dkr/|dkrd|z}nd}|�d||jfz��dS|�d|jz��dS#t$r|�d��YdSt$r }|�|��Yd}~dSd}~wwxYw)	a�ignore bpnumber [count]
        Set the ignore count for the given breakpoint number.  If
        count is omitted, the ignore count is set to 0.  A breakpoint
        becomes active when the ignore count is zero.  When non-zero,
        the count is decremented each time the breakpoint is reached
        and the breakpoint is not disabled and any associated
        condition evaluates to true.
        rrz%d crossingsz
1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.r�N)
rrUr�rV�ignorer�rlr�r-r�)r8r#r�countrB�countstrrXs       r�	do_ignorez
Pdb.do_ignore�s^���y�y�{�{��	���Q��
�
���(�(�E�E��	��E�E�E����	*��$�$�T�!�W�]�]�_�_�5�5�B��B�I��q�y�y��1�9�9�-��5�H�H�+�H����D�&��	�2�3�4�4�4�4�4����L�!�y�)�*�*�*�*�*���	5�	5�	5��J�J�3�4�4�4�4�4�4��	�	�	��J�J�s�O�O�O�O�O�O�O�O�O�����	���s'�'>�A�-C�D�2	D�;D�Dc���|s�	td��}n#t$rd}YnwxYw|������}|dvrLd�tjjD��}|���|D]}|�d|z���dSd|vr�|�	d��}|d|�}||dzd�}	t|��}|�||��dd�}|�||��}n#t$rd	|z}YnwxYw|r|�|��n|D]}|�d|z���dS|���}	|	D]q}	|�|��}|�|��|�d|z���F#t$r}|�|��Yd}~�jd}~wwxYwdS)
a=cl(ear) filename:lineno
cl(ear) [bpnumber [bpnumber...]]
        With a space separated list of breakpoint numbers, clear
        those breakpoints.  Without argument, clear all breaks (but
        first ask confirmation).  With a filename:lineno argument,
        clear all breaks at that line in that file.
        zClear all breaks? �no)�y�yesc��g|]}|�|��Sr
r
)r�rBs  rr�z Pdb.do_clear.<locals>.<listcomp>�s��G�G�G��B�G�"�G�G�Grz
Deleted %sNr/rzInvalid line number (%s))�input�EOFErrorr�r8r�rCrD�clear_all_breaksr�r`rUrk�clear_breakr�r-rrV�clear_bpbynumber)
r8r#�reply�bplistrBr1r"r%rX�
numberlists
          r�do_clearzPdb.do_clear�sX���	�
��2�3�3�����
�
�
�����
�����K�K�M�M�'�'�)�)�E���$�$�G�G�s�~�'@�G�G�G���%�%�'�'�'� �4�4�B��L�L���!2�3�3�3�3��F��#�:�:��	�	�#���A��2�A�2�w�H��a��c�d�d�)�C�
9��S��������6�:�:�1�1�1�=���&�&�x��8�8����	�
7�
7�
7�0�3�6����
7����
�
4��
�
�3����� �4�4�B��L�L���!2�3�3�3�3��F��Y�Y�[�[�
��	0�	0�A�
0��(�(��+�+���%�%�a�(�(�(����\�B�.�/�/�/�/��	�
 �
 �
 ��
�
�3�������������
 ����	0�	0s6��#�#�D�D%�$D%�8F;�;
G$�G�G$c�.�|���dS)z�w(here)
        Print a stack trace, with the most recent frame at the bottom.
        An arrow indicates the "current frame", which determines the
        context of most commands.  'bt' is an alias for this command.
        N)�print_stack_tracervs  r�do_wherezPdb.do_where�s��	
��� � � � � rc��d|cxkrt|j��ksnJ�||_|j|jd|_|jj|_|�|j|j��d|_dSr))rTr�r�r�r�r�r�r%)r8rls  r�
_select_framezPdb._select_frame�s����F�,�,�,�,�S���_�_�,�,�,�,�,�,���
��
�4�=�1�!�4��
�#�}�5������t�z�$�-�8�9�9�9�����rc�.�|jdkr|�d��dS	t|pd��}n)#t$r|�d|z��YdSwxYw|dkrd}nt	d|j|z
��}|�|��dS)z�u(p) [count]
        Move the current frame count (default one) levels up in the
        stack trace (to an older frame).
        rzOldest frameNr�Invalid frame count (%s))r�r-rUr��maxr��r8r#r��newframes    r�do_upz	Pdb.do_up�s���
�=�A����J�J�~�&�&�&��F�	����q�M�M�E�E���	�	�	��J�J�1�C�7�8�8�8��F�F�	�����1�9�9��H�H��1�d�m�e�3�4�4�H����8�$�$�$�$�$s�6�"A�Ac��|jdzt|j��kr|�d��dS	t	|pd��}n)#t
$r|�d|z��YdSwxYw|dkrt|j��dz
}n-t
t|j��dz
|j|z��}|�|��dS)z�d(own) [count]
        Move the current frame count (default one) levels down in the
        stack trace (to a newer frame).
        rzNewest frameNr�r)r�rTr�r-rUr��minr�r�s    r�do_downzPdb.do_down�s���
�=�1���D�J���/�/��J�J�~�&�&�&��F�	����q�M�M�E�E���	�	�	��J�J�1�C�7�8�8�8��F�F�	�����1�9�9��4�:����*�H�H��3�t�z�?�?�Q�.��
��0E�F�F�H����8�$�$�$�$�$s�A�"A1�0A1c��|rb	t|��}n)#t$r|�d|z��YdSwxYw||jjkr|�d��dSnd}|�|j|��dS)aNunt(il) [lineno]
        Without argument, continue execution until the line with a
        number greater than the current one is reached.  With a line
        number, continue execution until a line with a number greater
        or equal to that is reached.  In both cases, also stop when
        the current frame returns.
        �Error in argument: %rNz7"until" line number is smaller than current line numberr)rUr�r-r�r��	set_until)r8r#r%s   r�do_untilzPdb.do_untils����	�
��S�������
�
�
��
�
�2�S�8�9�9�9����
�������/�/�/��
�
�)�*�*�*���0�
�F����t�}�f�-�-�-��qs��":�:c�.�|���dS)z�s(tep)
        Execute the current line, stop at the first possible occasion
        (either in a function that is called or in the current
        function).
        r)r�rvs  r�do_stepzPdb.do_step*s��	
�
�
�����qrc�:�|�|j��dS)zxn(ext)
        Continue execution until the next line in the current function
        is reached or it returns.
        r)�set_nextr�rvs  r�do_nextzPdb.do_next4s��
	
�
�
�d�m�$�$�$��qrc��|r}ddl}tjdd�}	|�|��t_n3#t$r&}|�d|�d|����Yd}~dSd}~wwxYw|tjdd�<t�)arun [args...]
        Restart the debugged python program. If a string is supplied
        it is split with "shlex", and the result is used as the new
        sys.argv.  History, breakpoints, actions and debugger options
        are preserved.  "restart" is an alias for "run".
        rNrzCannot run r�)�shlexrJ�argvrr�r-r)r8r#r��argv0res     r�do_runz
Pdb.do_run=s����	!��L�L�L��H�Q�q�S�M�E�
� �;�;�s�+�+������
�
�
��
�
�
�#�#�#�q�q�9�:�:�:�����������
����!�C�H�R�a�R�L��
s�<�
A,�A'�'A,c�:�|�|j��dS)zPr(eturn)
        Continue execution until the current function returns.
        r)�
set_returnr�rvs  r�	do_returnz
Pdb.do_returnRs��	
����
�&�&�&��qrc��|js@	tjtj|j��t_n#t$rYnwxYw|���dS)z]c(ont(inue))
        Continue execution, only stop when a breakpoint is encountered.
        r)r�r�r�r�rr�r��set_continuervs  r�do_continuezPdb.do_continueZsm���}�		�
��M�&�-��1D�E�E��,�,���
�
�
�
��
����	
�������qs�.8�
A�Ac���|jdzt|j��kr|�d��dS	t	|��}	||j_|j|jd|f|j|j<|�|j|j��dS#t$r#}|�d|z��Yd}~dSd}~wwxYw#t$r|�d��YdSwxYw)a�j(ump) lineno
        Set the next line that will be executed.  Only available in
        the bottom-most frame.  This lets you jump back and execute
        code again, or jump forward to skip code that you don't want
        to run.

        It should be noted that not all jumps are allowed -- for
        instance it is not possible to jump into the middle of a
        for loop or out of a finally clause.
        rz)You can only jump within the bottom frameNrzJump failed: %sz)The 'jump' command requires a line number)	r�rTr�r-rUr�r�r�r�)r8r#res   r�do_jumpzPdb.do_jumpls!���=�1���D�J���/�/��J�J�B�C�C�C��F�	2��c�(�(�C�
2�*-��
�&�,0�J�t�}�,E�a�,H�#�,M��
�4�=�)��&�&�t�z�$�-�'@�A�A�A�A�A���
2�
2�
2��
�
�,�q�0�1�1�1�1�1�1�1�1�1�����
2������	D�	D�	D��J�J�B�C�C�C�C�C�C�	D���s*�C�	AB#�#
C�-C�C�C6�5C6c��tjd��|jj}|j}t|j|j|j��}d|j	�
��z|_	|�d��	tj|j
|||f��n$#t$r|���YnwxYw|�d��tj|j��|j|_dS)z�debug code
        Enter a recursive debugger that steps through the code
        argument (which is an arbitrary expression or statement to be
        executed in the current environment).
        Nz(%s) zENTERING RECURSIVE DEBUGGERzLEAVING RECURSIVE DEBUGGER)rJ�settracer�r�r�rr�r�r�r�r�r��call_tracingr
rbr��trace_dispatchr�)r8r#rr�ps     r�do_debugzPdb.do_debug�s���	��T�����-�)���%���� �$�*�d�k�:�:���T�[�.�.�0�0�0������2�3�3�3�	���Q�U�S�'�6�$:�;�;�;�;���	�	�	��O�O������	�������1�2�2�2���T�(�)�)�)��y����s�?B�B>�=B>c�<�d|_|���dS)z[q(uit)
exit
        Quit from the debugger. The program being executed is aborted.
        Tr)�_user_requested_quit�set_quitrvs  r�do_quitzPdb.do_quit�s��%)��!��
�
�����qrc�f�|�d��d|_|���dS)z=EOF
        Handles the receipt of EOF as a command.
        r�Tr)r�r�r�rvs  r�do_EOFz
Pdb.do_EOF�s0��	
���R����$(��!��
�
�����qrc	��|jj}|j}|j|jz}|jtjzr|dz}|jtjzr|dz}t|��D]`}|j
|}||vr5|�|�d|�|||�������H|�|�d����adS)zHa(rgs)
        Print the argument list of the current function.
        r� = z = *** undefined ***N)
r�r�r��co_argcount�co_kwonlyargcount�co_flags�inspect�
CO_VARARGS�CO_VARKEYWORDS�range�co_varnamesr�r�)r8r#�corUrKr1rns       r�do_argszPdb.do_args�s����]�
!���#���N�R�1�1��
�;��+�+�4��1��Q�
�;��/�/�8�Q�q�S���q���	A�	A�A��>�!�$�D��t�|�|����$�$�$�����T�
�D�0Q�0Q�0Q�R�S�S�S�S�������?�@�@�@�@�	A�	Arc��d|jvr6|�|�|jdd����dS|�d��dS)zQretval
        Print the return value for the last return of a function.
        r��retvalzNot yet returned!N)r�r�r�r-rvs  r�	do_retvalz
Pdb.do_retval�sY���4�/�/�/��L�L�����)=�l�)K�X�V�V�W�W�W�W�W��J�J�*�+�+�+�+�+rc�x�	t||jj|j��S#|����xYwr6)rbr�r�r�r�rvs  r�_getvalzPdb._getval�s=��	���T�]�4�d�6J�K�K�K��	��O�O�������s�"�9c�2�	|� t||jj|j��St||j|j��S#tj��dd�}tj|�d�	��}td|z��cYSxYw)Nr
r�z** raised %s **)rbr�r�r�r�rJr�rcr�r�r4)r8r#r�r�rXs     rr�zPdb._getval_except�s���	2��}��C���!8�$�:N�O�O�O��C���%�.�A�A�A��	2��|�~�~�b�q�b�)�H��1�8�<�R�@�F�F�H�H�C��*�S�0�1�1�1�1�1���s�!?�?�ABc��tj��dd�}|�tj|�d�����dS)Nr
r�)rJr�r-rcr�r�)r8r�s  rr�zPdb._error_exc�sG���<�>�>�"�1�"�%���
�
�9�2�H�=�b�A�G�G�I�I�J�J�J�J�Jrc��	|�|��}n#YdSxYw	|�||����dS#|���YdSxYwr6)r�r�r�)r8r#r%rDs    r�
_msg_val_funczPdb._msg_val_func�sq��	��,�,�s�#�#�C�C��	��F�F����	��L�L���c���#�#�#�#�#��	��O�O���������s���A�Ac	��	t|��S#t$r3}td|�d|�|���d���cYd}~Sd}~wwxYw)Nz	*** repr(z
) failed: z ***)r�rbr4�_format_exc)r8r�r�res    rr�zPdb._safe_repr�sv��	P���9�9����	P�	P�	P��N�T�N�N�T�5E�5E�a�5H�5H�N�N�N�O�O�O�O�O�O�O�O�����	P���s��
A�(A	�A�	Ac�<�|�|t��dS)z@p expression
        Print the value of the expression.
        N)r�r�rvs  r�do_pzPdb.do_p�s ��	
���3��%�%�%�%�%rc�F�|�|tj��dS)zHpp expression
        Pretty-print the value of the expression.
        N)r��pprint�pformatrvs  r�do_ppz	Pdb.do_pp�s"��	
���3���/�/�/�/�/rc�^�d|_d}|r�|dkr�	d|vrf|�d��\}}t|�����}t|�����}||kr||z}n4t|�����}t	d|dz
��}n^#t
$r|�d|z��YdSwxYw|j�|dkrt	d|jj	dz
��}n
|jdz}|�|dz}|jj
j}|�d	��r6|jj
�d
��}t|t ��r|}|�|��}	t%j||jj
��}|�||dz
|�|||j��t+|t-|����|_t-|��|kr|�d��dSdS#t0$rYdSwxYw)a�l(ist) [first [,last] | .]

        List source code for the current file.  Without arguments,
        list 11 lines around the current line or continue the previous
        listing.  With . as argument, list 11 lines around the current
        line.  With one argument, list 11 lines starting at that line.
        With two arguments, list the given range; if the second
        argument is less than the first, it is a count.

        The current line in the current frame is indicated by "->".
        If an exception is being debugged, the line where the
        exception was originally raised or propagated is indicated by
        ">>", if it differs from the current line.
        r*NrHr0r�r��
z<frozenrRz[EOF])r�rrUr�r�r�r-r%r�r�r�rjr�r�r��
isinstancer
�get_file_breaksr��getlines�_print_linesr�rTr�r�)r8r#�last�firstr"�tmp�	breaklist�liness        r�do_listzPdb.do_listsD��������	$�3�#�:�:�

��#�:�:�"%�)�)�C�.�.�K�E�4�����
�
�.�.�E��t�z�z�|�|�,�,�D��e�|�|�$�t�|�����	�	���,�,�E���5�1�9�-�-�E����
�
�
��
�
�2�S�8�9�9�9����
�����[�
 �C�3�J�J���4�=�1�A�5�6�6�E�E��K�!�O�E��<��2�:�D��=�'�3�����y�)�)�	��-�)�-�-�j�9�9�C��#�s�#�#�
����(�(��2�2�	�	��&�x���1H�I�I�E����e�E�!�G�D�L�1�5�)�"�m�
-�
-�
-��d�C��J�J�/�/�D�K��5�z�z�D� � ����W�%�%�%�%�%�!� �� �	�	�	��D�D�	���s%�BB2�2"C�C�	BH�
H,�+H,c�$�|jjj}|�|��}	|�|j��\}}n-#t
$r }|�|��Yd}~dSd}~wwxYw|�||||j��dS)z\longlist | ll
        List the whole source code for the current function or frame.
        N)r�r�rjr��_getsourcelinesrr-r�)r8r#r"r�r�r%rXs       r�do_longlistzPdb.do_longlist=s����=�'�3���(�(��2�2�	�	� �0�0���?�?�M�E�6�6���	�	�	��J�J�s�O�O�O��F�F�F�F�F�����	����	
���%���D�M�B�B�B�B�Bs�A�
A0�A+�+A0c��	|�|��}n#YdSxYw	|�|��\}}n4#ttf$r }|�|��Yd}~dSd}~wwxYw|�||��dS)z^source expression
        Try to get source code for the given object and display it.
        N)r�rr�	TypeErrorr-r�)r8r#r�r�r%rXs      r�	do_sourcez
Pdb.do_sourceKs���	��,�,�s�#�#�C�C��	��F�F����	� �0�0��5�5�M�E�6�6����#�	�	�	��J�J�s�O�O�O��F�F�F�F�F�����	����	
���%��(�(�(�(�(s���:�A+�A&�&A+r
c��|r#|j}|j�|d��}ndx}}t||��D]�\}}t	|���d��}	t
|	��dkr|	dz
}	||vr|	dz
}	n|	dz
}	||kr|	dz
}	n||kr|	dz
}	|�|	dz|���z����d	S)
zPrint a range of lines.r�rz�r�Bz->z>>�	N)	r�r�r�rr
�rjustrTr�r)
r8r�rr^r��current_lineno�
exc_linenor%r&�ss
          rr�zPdb._print_lines\s����	-�"�^�N���+�+�E�2�6�6�J�J�*,�,�N�Z�%�e�U�3�3�	3�	3�L�F�D��F���!�!�!�$�$�A��1�v�v��z�z��S��������S�����S�����'�'��T�	����:�%�%��T�	���L�L��T��D�K�K�M�M�1�2�2�2�2�	3�	3rc���	|�|��}n#YdSxYwd}	|jj}n#t$rYnwxYw|r|�d|jz��dS	|j}n#t$rYnwxYw|r|�d|jz��dS|jtur'|�d|j�d|j	����dS|�t|����dS)z;whatis arg
        Print the type of the argument.
        Nz	Method %szFunction %szClass rH)
r�r]rdrbr�rerF�typerr)r8r#�valuer.s    r�	do_whatisz
Pdb.do_whatisqs2��	��L�L��%�%�E�E��	��F�F������	��>�*�D�D���	�	�	��D�	�����	��L�L��t�|�3�4�4�4��F�	��>�D�D���	�	�	��D�	�����	��L�L����5�6�6�6��F��?�d�"�"��L�L�L�%�*:�*:�*:�E�<N�<N�O�P�P�P��F����T�%�[�[�!�!�!�!�!s&���0�
=�=�"A*�*
A7�6A7c	���|s}|�d��|j�|ji�����D]3\}}|�|�d|�||�������4dS|�|��}||j�|ji��|<|�d|�d|�||������dS)z�display [expression]

        Display the value of the expression if it changed, each time execution
        stops in the current frame.

        Without expression, list all display expressions for the current frame.
        zCurrently displaying:r�r�N)r�r�r�r�r�r�r��
setdefault)r8r#�keyrDs    r�
do_displayzPdb.do_display�s����	N��L�L�0�1�1�1� �O�/�/��
�r�B�B�H�H�J�J�
J�
J���S�������d�o�o�c�3�.G�.G�.G�H�I�I�I�I�
J�
J��%�%�c�*�*�C�AD�D�O�&�&�t�}�b�9�9�#�>��L�L�L�S�S�S�$�/�/�#�s�2K�2K�2K�L�M�M�M�M�Mrc���|rM	|j�|ji��|=dS#t$r|�d|z��YdSwxYw|j�|jd��dS)z�undisplay [expression]

        Do not display the expression any more in the current frame.

        Without expression, clear all display expressions for the current frame.
        znot displaying %sN)r�r�r�rNr-�poprvs  r�do_undisplayzPdb.do_undisplay�s����	5�
6��O�'�'��
�r�:�:�3�?�?�?���
6�
6�
6��
�
�.��4�5�5�5�5�5�5�
6����
�O����
�t�4�4�4�4�4s�!'�"A
�A
c�\���fd�|j�|ji��D��S)Nc�>��g|]}|�����|��Sr
rJ)r�rer9s  �rr�z*Pdb.complete_undisplay.<locals>.<listcomp>�s9���'�'�'�a��<�<��%�%�'��'�'�'r)r�r�r�rEs `   r�complete_undisplayzPdb.complete_undisplay�sA���'�'�'�'�4�?�.�.�t�}�b�A�A�'�'�'�	'rc�\�i|jj�|j�}tjd|���dS)z�interact

        Start an interactive interpreter whose global namespace
        contains all the (global and local) names found in the current scope.
        z
*interactive*)�localN)r�r�r�r.�interact)r8r#rQs   r�do_interactzPdb.do_interact�s7��A��
�'�
@�4�+?�
@���
�o�R�0�0�0�0�0�0rc�:�|���}t|��dkrRt|j�����}|D]'}|�|�d|j|�����(dSt|��dkrc|d|jvr3|�|d�d|j|d����dS|�d|d�d���dSd�|dd���|j|d<dS)acalias [name [command [parameter parameter ...] ]]
        Create an alias called 'name' that executes 'command'.  The
        command must *not* be enclosed in quotes.  Replaceable
        parameters can be indicated by %1, %2, and so on, while %* is
        replaced by all the parameters.  If no command is given, the
        current alias for name is shown. If no name is given, all
        aliases are listed.

        Aliases may be nested and can contain anything that can be
        legally typed at the pdb prompt.  Note!  You *can* override
        internal pdb commands with aliases!  Those internal commands
        are then hidden until the alias is removed.  Aliasing is
        recursively applied to the first word of the command line; all
        other words in the line are left alone.

        As an example, here are two useful aliases (especially when
        placed in the .pdbrc file):

        # Print instance variables (usage "pi classInst")
        alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])
        # Print instance variables in self
        alias ps pi self
        rr�NrzUnknown alias 'ryr)rrT�sortedr�rPr�r-r)r8r#rrPr	s     r�do_aliaszPdb.do_alias�s��0�y�y�{�{���t�9�9��>�>��$�,�+�+�-�-�.�.�D��
G�
G�����%�%�%���e�1D�1D�E�F�F�F�F��F��t�9�9��>�>��A�w�$�,�&�&����$�q�'�'�'�4�<��Q��3H�3H�I�J�J�J�J�J��
�
�7�T�!�W�7�7�7�8�8�8�8�8�$'�H�H�T�!�"�"�X�$6�$6�D�L��a��!�!�!rc��|���}t|��dkrdS|d|jvr|j|d=dSdS)z9unalias name
        Delete the specified alias.
        rN)rrTr�)r8r#rs   r�
do_unaliaszPdb.do_unalias�sQ���y�y�{�{���t�9�9��>�>�6�6���7�d�l�"�"���T�!�W�%�%�%�#�"rc�*���fd�|jD��S)Nc�>��g|]}|�����|��Sr
rJ)r��ar9s  �rr�z(Pdb.complete_unalias.<locals>.<listcomp>�s*���>�>�>�a�1�<�<��+=�+=�>��>�>�>r)r�rEs `   r�complete_unaliaszPdb.complete_unalias�s���>�>�>�>�4�<�>�>�>�>r)r�r�r�r�r�r�c�h�	|jD]}|�|���dS#t$rYdSwxYwr6)r�r�r�)r8�frame_linenos  rr�zPdb.print_stack_traces[��	� $�
�
5�
5���&�&�|�4�4�4�4�
5�
5�� �	�	�	��D�D�	���s�#�
1�1c��|\}}||jurd}nd}|�||�||��z��dS)Nz> z  )r�r��format_stack_entry)r8r)�
prompt_prefixr�r%r�s      rr�zPdb.print_stack_entrysd��$�
��v��D�M�!�!��F�F��F����V��,�,�\�=�I�I�J�	K�	K�	K�	K�	Krc��|s tj�||��S		t|d|z��}|��S#t$rt|d|z��}YnwxYw	t
jjdkr|�d|z��dS|j	�|�d|z��dS|�
|j	�����dS#t$r|�d|z��YdSwxYw)z�h(elp)
        Without argument, print the list of available commands.
        With a command name as argument, print help about that command.
        "help pdb" shows the full pdb documentation.
        "help exec" gives help on the ! command.
        �help_rr
zJNo help for %r; please do not run Python with -OO if you need command helpNz&No help for %r; __doc__ string missingzNo help for %r)r�r��do_helpr�r!rJ�flags�optimizer-r	r�r)r8r#�topic�commands    rr/zPdb.do_helpsB���	.��7�?�?�4��-�-�-�	3�
5���g��m�4�4���u�w�w���!�
5�
5�
5�!�$����4�4����
5������y�!�Q�&�&��
�
�6�8;�<�=�=�=�����&��
�
�C�c�I�J�J�J����L�L���/�/�1�1�2�2�2�2�2���	/�	/�	/��J�J�'�#�-�.�.�.�.�.�.�	/���s)�A�A"�C$�!A"�"C$�$"D
�	D
c�l�|�|jjpd�����dS)a�(!) statement
        Execute the (one-line) statement in the context of the current
        stack frame.  The exclamation point can be omitted unless the
        first word of the statement resembles a debugger command.  To
        assign to a global variable you must always prefix the command
        with a 'global' command, e.g.:
        (Pdb) global list_options; list_options = ['-l']
        (Pdb)
        r�N)r��	help_execr	r�r7s rr5z
Pdb.help_exec0s2��	
���d�n�,�2��9�9�;�;�<�<�<�<�<rc�"�t��dSr6)rr7s r�help_pdbzPdb.help_pdb<s�������rc�H�tj�|��r!tj�|��r|Stj�t
jd|��}tj�|��r |�|��|jkr|Stj�|��\}}|dkr|dz}tj�|��r|St
jD]�}tj�	|��r3tj
|��}tj�	|���3tj�||��}tj�|��r|cS��dS)z�Helper function for break/clear parsing -- may be overridden.

        lookupmodule() translates (possibly incomplete) file or module name
        into an absolute file name.
        rr�r3N)r?r@�isabsrHrrJr�r��splitext�islink�readlink)r8r"r��root�extrM�fullnames       rrazPdb.lookupmoduleAsS���7�=�=��"�"�	�����x�(@�(@�	��O��G�L�L���!��h�/�/���G�N�N�1���	�$�,�,�q�/�/�T�_�"D�"D��H��G�$�$�X�.�.�	��c��"�9�9��%�'�H�
�7�=�=��"�"�	��O��x�	 �	 �G��'�.�.��)�)�
/��+�g�.�.���'�.�.��)�)�
/��w�|�|�G�X�6�6�H��w�~�~�h�'�'�
 �����
 ��tr�targetc��d|_d|_|�|j��|_ddl}|j���|j�|j	��|�
|j��dS)NTFr)r�r�r�r"r�rQ�__dict__r��updaterVr
r.)r8r@rQs   r�_runzPdb._runYs}��%)��!�$)��!��,�,�v��7�7���
	��������!�!�!��� � ��!1�2�2�2����������r�excc�Z�tj|��d���S)Nr�)rcr�r�)r8rEs  rr�zPdb._format_excms$���.�s�3�3�B�7�=�=�?�?�?rc�X�tj|��\}}td|��}||fS)Nr)r��getsourcelinesr�)r8r�r�r%s    rrzPdb._getsourcelinesps/�� �.�s�3�3�
��v��Q������f�}�r)r}NNNFT)rr6)r
N)~rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�rr�r-r?rFr5r[�complete_commandsrsrh�do_b�complete_break�
complete_brw�complete_tbreakrgrir��complete_enabler��complete_disabler��complete_conditionr��complete_ignorer��do_cl�complete_clear�complete_clr��do_w�do_btr�r��do_ur��do_dr��do_untr��do_sr��do_nr��
do_restartr��do_rr��do_c�do_contr��do_jr��complete_debugr��do_q�do_exitr�r��do_ar��do_rvr�r�r�r�r�r�r��complete_print�
complete_p�complete_ppr��do_lr�do_llr�complete_sourcer�r�complete_whatisr�complete_displayrrrr!r#r'r"r��line_prefixr�r/�do_hr5r7rarr^r;rD�
BaseExceptionr�rr
rrrr�s2������#��HL�(,�,"�,"�,"�,"�^������������2*�*�*�*�*�*����0&�&�&�/�/�/�(
6�
6�
6�D�D�D���� $�$�$����*���2
1�
1�
1����8%�%�%�,�,�,����&?�?�?�@�@�@�:Q&�Q&�Q&�f+��Z<�Z<�Z<�Z<�z����D�'�N�#�J����)�O� � � �B���,
0�
0�
0�)�O�1�1�1�$*��Q�Q�Q�2,��*�*�*�B)�O�-0�-0�-0�\
�E�'�N�$�K�!�!�!��D��E����%�%�%�$�D�%�%�%�$�D����,�F�����D�����D����&�J�����D���� !� �D�7�2�2�2�6�D�!�!�!�(*�N�����D��G����A�A�A��D�,�,�,�
�E����	2�	2�	2�	2�K�K�K����P�P�P�&�&�&�0�0�0�*�N�%�J�&�K�6�6�6�n�D�C�C�C�
�E�
)�
)�
)�+�O�3�3�3�3�*"�"�"�B+�O�N�N�N�",��
5�
5�
5�'�'�'�1�1�1�$7�$7�$7�L&�&�&�?�?�?�/�/�/�����=H�K�K�K�K�3�3�3�6�D�
=�
=�
=����
���0�5��
�!=�>�����(@�}�@�@�@�@�����rr)"r�where�down�up�break�tbreakr�r�r�r��	conditionr��stepr�until�jump�returnr�r
�continuer*�longlistrr��pp�whatis�source�display�	undisplayrr	�unalias�debug�quitrz

c�L�t���|||��dSr6)rr
��	statementrrs   rr
r
�s"���E�E�I�I�i��&�)�)�)�)�)rc�H�t���|||��Sr6)rr)�
expressionrrs   rrr�s���5�5�=�=��W�f�5�5�5rc�(�t|||��dSr6)r
r�s   rrr�s���	�7�F�#�#�#�#�#rc�4�t��j|i|��Sr6)rr)r�kwdss  rrr�s���3�5�5�=�$�'�$�'�'�'r)�headerc��t��}|�|j|��|jtj��j��dSr6)rr�rrJ�	_getframe�f_back)r��pdbs  rrr�sD��

�%�%�C�
�����F�����C�M�#�-�/�/�(�)�)�)�)�)rc���|�tj��d}|�td���t��}|���|�d|��dS)Nr
zAA valid traceback must be passed if no exception is being handled)rJr�r�rr�r�)�tr�s  rrr�sg���y�
�L�N�N�1����y��6�7�7�	7�	���A��G�G�I�I�I��M�M�$������rc�8�ttj��dSr6)rrJ�last_tracebackr
rrrr�s����"�#�#�#�#�#rzimport x; x.main()c�.�tt��dSr6)r
�TESTCMDr
rr�testr��s����L�L�L�L�Lrc�B�ddl}|�t��dSr))�pydoc�pagerr	)r�s rrr�s#���L�L�L�	�K�K������rausage: pdb.py [-c command] ... [-m module | pyfile] [arg] ...

Debug the Python program given by pyfile. Alternatively,
an executable module or package to debug can be specified using
the -m switch.

Initial commands are read from .pdbrc files in your home directory
and in the current directory, if they exist.  Commands supplied with
-c are executed after commands from .pdbrc files.

To let the script run until an exception occurs, use "-c continue".
To let the script run up to a given line X in the debugged file, use
"-c 'until X'".c	�8�ddl}|�tjdd�dddg��\}}|s(tt��tjd��t
d�|D����r'tt��tj��d�|D��}t
d	�|D����}|rtnt}||d��}|�	��|tjdd�<t��}|j�|��		|j
|��|jrdStd���n>#t$rKtd|d
��tdd�tjdd���z��Yn�t"$r:tdd���ttj��d��Yn�t&$r*t)j��tjd��Ynvt)j��td��td��tj��d}|jd|��td|zdz��YnxYw��k)Nrrzmhc:rzcommand=r
c3�$K�|]\}}|dvV��dS))z-hz--helpNr
�r��opt�optargs   r�	<genexpr>zmain.<locals>.<genexpr>�s,����
;�
;�{�s�F�3�"�"�
;�
;�
;�
;�
;�
;rc� �g|]\}}|dv�	|��S))z-cz	--commandr
r�s   rr�zmain.<locals>.<listcomp>�s'��M�M�M�;�3��#�9L�2L�2L��2L�2L�2Lrc3�$K�|]\}}|dvV��dS))z-mNr
r�s   rr�zmain.<locals>.<genexpr>�s*����A�A�[�S�&�3�&�=�A�A�A�A�A�ArTz*The program finished and will be restarted�
Restartingzwith arguments:rrz/The program exited via sys.exit(). Exit status:)rz2Uncaught exception. Entering post mortem debuggingz1Running 'cont' or 'step' will restart the programz#Post mortem debugger finished. The z will be restarted)�getoptrJr�rI�_usagerK�anyr^r;rNrr�r�rDr�rr�
SystemExitr��SyntaxErrorrcrdr�)	r��optsrr��module_indicatedrCr@r�r�s	         r�mainr��s����M�M�M����s�x����|�V�f�j�5I�J�J�J�D�$���
�f�
�
�
�������
�
;�
;�d�
;�
;�
;�;�;��
�f�
�
�
���
�
�
�M�M�$�M�M�M�H��A�A�D�A�A�A�A�A��+�
>�-�-��C�
�S��a��\�\�F�
�L�L�N�N�N��C�H�Q�Q�Q�K��%�%�C��K���x� � � �(�	(��C�H�V�����'�
����>�?�?�?�?���	1�	1�	1��,��(9�:�:�:��$����#�(�1�2�2�,�/�/�/�0�0�0�0�0��	%�	%�	%��C��M�M�M�M��#�,�.�.��#�$�$�$�$�$��	�	�	���!�!�!��H�Q�K�K�K�K�K�	(���!�!�!��F�G�G�G��E�F�F�F�����q�!�A��C�O�D�!�$�$�$��7�&�@�&�'�
(�
(�
(�
(�
(����-(s'�2E�E�AJ�0AJ�20J�$A1JrQ)NNr6)3r	r?rXrrJr�r�r+r.r6r�r�r�rrzrcr��typingrrbr�__all__r'r2r
r4r;r^rnr�r�r�_help_order�_commandr�r�r5r
rrrrrrr�r�rr�r�rr�r
rr�<module>r�sA��?�?�F
�	�	�	�	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
���������
�
�
�
�
�
�
�
���������������������������	�	�	�	�	�i�	�	�	�"�"�"�����
�
�
������C����%E�%E�%E�%E�%E�C�%E�%E�%E�P'
�'
�'
�'
�'
�C�'
�'
�'
�^��b�b�b�b�b�#�'�3�7�b�b�b�L-�����K� �K�K���7�7�3��� 0�1�1�9�?�?�A�A�F�J�J����s�}�$�$�G��X�
*�*�*�*�6�6�6�6�$�$�$�(�(�(��*�*�*�*�*�����$�$�$���������
�� 4(�4(�4(�p�z����J�J�J��C�H�J�J�J�J�J��r

Hacked By AnonymousFox1.0, Coded By AnonymousFox