Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/pdb.cpython-312.pyc

�

0�f���v�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlmZGd�de�Zgd�Zd�Zd�ZGd	�d
e�ZGd�de�ZGd
�de�ZdZGd�dej<ej>�Z e�Pgd�Z!e!D],Z"ee#e de"z�jjI�dzz
Z�.ee jJjz
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 Z0d!�Z1e2d"k(rddl3Z3e3jb�yy)%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��eZdZdZy)�RestartzBCauses a debugger to be restarted for the debugged python program.N)�__name__�
__module__�__qualname__�__doc__���*/opt/alt/python312/lib64/python3.12/pdb.pyrr[s��L�rr)	�run�pm�Pdb�runeval�runctx�runcall�	set_trace�post_mortem�helpc�@�tjdtj|�z�}	tj|�}|5t
|d��D]&\}}|j|�s�|||fccddd�S	ddd�y#t
$rYywxYw#1swYyxYw)Nzdef\s+%s\s*[(]�)�start)�re�compile�escape�tokenize�open�OSError�	enumerate�match)�funcname�filename�cre�fp�lineno�lines      r�
find_functionr'bs���
�*�*�&����8�)<�<�
=�C��
�]�]�8�
$��
�2�%�b��2�L�F�D��y�y�����6�1�1�2�2�2�2��������2��s)�B�%B�*B�:B�	B�B�Bc��ttj|��}|j�|D]\}}||k\s�|cSy�Nr)�list�dis�findlinestarts�reverse)�code�lasti�
linestarts�ir%s     r�lasti2linenor2osB���c�(�(��.�/�J������	��6��A�:��M� �
rc��eZdZdZd�Zy)�_rstrz#String that doesn't quote its repr.c��|S�Nr
��selfs r�__repr__z_rstr.__repr__zs���rN)rrrr	r9r
rrr4r4xs
��-�rr4c�T��eZdZ�fd�Zd�Zed��Zed��Zed��Z�xZ	S)�
_ScriptTargetc�p��t�|�|tjj	|��}||_|Sr6)�super�__new__�os�path�realpath�orig)�cls�val�res�	__class__s   �rr>z_ScriptTarget.__new__s0����g�o�c�2�7�7�#3�#3�C�#8�9������
rc��tjj|�s,td|jd�tjd�tjj|�r,td|jd�tjd�tjj|�t
jd<y)NzError:zdoes not existrzis a directoryr)	r?r@�exists�printrB�sys�exit�isdir�dirnamer7s r�checkz_ScriptTarget.check�sv���w�w�~�~�d�#��(�D�I�I�'7�8��H�H�Q�K�
�7�7�=�=����(�D�I�I�'7�8��H�H�Q�K��g�g�o�o�d�+�����rc��|Sr6r
r7s rr"z_ScriptTarget.filename�s���rc�(�td|td��S)N�__main__)r�__file__�__builtins__�__spec__)�dictrSr7s r�	namespacez_ScriptTarget.namespace�s�����%��	
�	
rc��tj|�5}d|j��d|�d�cddd�S#1swYyxYw)Nz
exec(compile(z, z
, 'exec')))�io�	open_code�read)r8r$s  rr.z_ScriptTarget.code�sA��
�\�\�$�
�	E�2�"�2�7�7�9�-�r�$���D�	E�	E�	E�s	�7�A)
rrrr>rN�propertyr"rVr.�
__classcell__)rFs@rr;r;~sK����	,������
��
��E��Err;c�v�eZdZd�Zej
d��Zed��Zed��Z	ed��Z
ed��Zy)�
_ModuleTargetc��	|jy#t$r-}td|���tjd�Yd}~yd}~wt
$r,t
j�tjd�YywxYw)Nz
ImportError: r)�_details�ImportErrorrIrJrK�	Exception�	traceback�	print_exc)r8�es  rrNz_ModuleTarget.check�sY��	��M�M���	��M�!��%�&��H�H�Q�K�K���	����!��H�H�Q�K�	�s��	A8�#A�5A8�7A8c�,�ddl}|j|�Sr))�runpy�_get_module_details)r8rgs  rr`z_ModuleTarget._details�s����(�(��.�.rc�.�|jjSr6)r.�co_filenamer7s rr"z_ModuleTarget.filename�s���y�y�$�$�$rc�&�|j\}}}|Sr6�r`�r8�name�specr.s    rr.z_ModuleTarget.code�����=�=���d�D��rc�&�|j\}}}|Sr6rlrms    r�_specz_ModuleTarget._spec�rprc��tdtjjtjj	|j
��|jj|jj|jt��S)NrQ)rrR�__package__�
__loader__rTrS)
rUr?r@�normcase�abspathr"rr�parent�loaderrSr7s rrVz_ModuleTarget.namespace�sY�����W�W�%�%�b�g�g�o�o�d�m�m�&D�E��
�
�)�)��z�z�(�(��Z�Z�%�

�	
rN)rrrrN�	functools�cached_propertyr`r[r"r.rrrVr
rrr^r^�sq������/��/��%��%����������
��
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�Zd�Zd�Zd�ZeZdYd�Z d�Z!e Z"eZ#eZ$d�Z%eZ&d �Z'd!�Z(d"�Z)eZ*d#�Z+eZ,d$�Z-eZ.d%�Z/eZ0d&�Z1e1Z2eZ3eZ4d'�Z5e5Z6e5Z7d(�Z8d)�Z9e9Z:d*�Z;e;Z<d+�Z=e=Z>d,�Z?e?Z@d-�ZAeAZBd.�ZCeCZDd/�ZEeEZFd0�ZGeGxZHZId1�ZJeJZKd2�ZLeZMd3�ZNeNZOeNZPd4�ZQd5�ZReRZSd6�ZTeTZUd7�ZVdZd8�ZWd9�ZXd:�ZYd;�ZZd<�Z[d=�Z\eZ]eZ^eZ_d>�Z`e`Zad?�ZbebZcd@�ZdeZed[dA�ZfdB�ZgeZhdC�ZieZjdD�ZkdE�ZldF�ZmdG�ZndH�ZodI�ZpgdJ�ZqdK�ZresfdL�ZtdM�ZueuZvdN�ZwdO�ZxdP�ZydQeze{e|ffdR�Z}dSe~fdT�ZdU�Z�dV�Z�dW�Z�y)\rNc�F�tjj||��tjj||||�tjd�|rd|_d|_i|_	i|_
d|_d|_i|_
	ddl}|jd�d|_||_g|_|r�	t)t*j,j/d�d	�
�5}|j&j1|�ddd�	t)dd	�
�5}|j&j1|�ddd�i|_i|_i|_d|_d|_y#t $rY��wxYw#1swY�nxYw#t2$rY�|wxYw#1swY�WxYw#t2$rY�ewxYw)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�stdoutr~r��readrcr��rcFiles	         rr�zPdb.__init__�s���������D��)�������{�E�6�:��	�	�)��� !�D��������������$)��!����	���)�)�*M�N�"��� ��
�����
��"�'�'�,�,�Z�8�7�K�0�v��L�L�'�'��/�0�
��(�W�5�0���L�L�'�'��/�0�
��
�!#���!���!&���!����5�	��	��0�0���
��
��0�0���
��
�sf�
E�:*E9�$E-�E9�	
F�F�2F�	E*�)E*�-E6�2E9�9	F�F�F�
F�	F �F c��|jrt�|jd�|j�|j	|�y)Nz-
Program interrupted. (Use 'cont' to resume).)r��KeyboardInterrupt�message�set_stepr)r8�signum�frames   r�sigint_handlerzPdb.sigint_handler
s3�����#�#����E�F��
�
�����u�rc�b�tjj|�|j�yr6)r�r��reset�forgetr7s rr�z	Pdb.resets�����
�
�d�����
rc���d|_g|_d|_t|d�r2|jr&|jj
j
dd�d|_|jj�y)Nr�curframe�__pdb_convenience_variables)	r%�stack�curindex�hasattrr��	f_globals�popr��clearr7s rr�z
Pdb.forgetsY�������
���
��4��$�����M�M�#�#�'�'�(E�t�L���
������rc��|j�|j||�\|_|_|rRt	|j
j|j�}||j|j
<|j}|r�R|j|jd|_
|jj|_|j|jd|j�|jrV|jD�cgc]3}|j�r!|j�j!d�s|��5c}|_g|_yycc}w)Nr�_frame�#)r��	get_stackr�r�r2�tb_frame�f_code�tb_lastir��tb_nextr��f_locals�curframe_locals�set_convenience_variabler��strip�
startswith�cmdqueue)r8�f�tbr%r&s     r�setupz	Pdb.setups�����
�$(�N�N�1�b�$9�!��
�D�M��"�"�+�+�"4�"4�b�k�k�B�F�*0�D�N�N�2�;�;�'����B�
��
�
�4�=�=�1�!�4��
� $�}�}�5�5����%�%�d�m�m�X�t�}�}�M��<�<�!%������:�:�<��
�
��(?�(?��(D���D�M��D�L���s�8E
c��|jry|j|�r$|jd�|j|d�yy)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_call8s=���$�$���>�>�%� ��L�L��$����U�D�)�!rc��|jrI|j|j|jj�k7s|j
dkryd|_|j
|�r|j|d�yy)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_lineAsd���$�$����4�<�<����0H�0H�#I�I��>�>�Q�&��(-�D�%����E�"����U�D�)�#rc���t|dd�r�|j|jvr�|j}d|_|j}|j	|d�|j|D]}|j|��||_|j|s(|j|j|j�|j|r|j�|j�yy)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_commandsKs����4��e�,��~�~����.����I��D�N��<�<�L��J�J�u�d�#��
�
�i�0�����D�!�1�'�D�L��'�'�	�2��&�&�t�z�z�$�-�-�'@�A��%�%�i�0��
�
���K�K�M��rc��|jry||jd<|j|d|�|jd�|j	|d�y)z7This function is called when a return trap is set here.N�
__return__�_retvalz
--Return--)r�r�r�r�r�)r8r��return_values   r�user_returnzPdb.user_returncsJ���$�$��'3����|�$��%�%�e�Y��E����\�"������%rc��|jry|\}}}||f|jd<|j|d|�|s
|turdnd}|j	|�|j|����|j
||�y)zoThis function is called if an exception occurs,
        but only if we are to stop at or just below this level.N�
__exception__�
_exceptionz	Internal r)r�r�r��
StopIterationr��_format_excr�)r8r��exc_info�exc_type�	exc_value�
exc_traceback�prefixs       r�user_exceptionzPdb.user_exceptionls����$�$��-5�*��)�]�*2�I�*=�����'��%�%�e�\�9�E�&3�(0�M�(A��HJ�	����v�t�'7�'7�	�'B�C�D�����
�.rc��		d|_|j�d|_y#t$r|jd�YnwxYw�A)NTFz--KeyboardInterrupt--)r��cmdloopr�r�r7s rr�zPdb._cmdloop�sI���
6�%)��!�����$)��!���$�
6����4�5�
6��s�"�?�?c�<�|jj|j�}|ru|j�D]a\}}|j	|�}||us�||k7s�"|||<|jd|�d|j
||��d|j
||��d���cyy)N�display �: z  [old: �])r��getr��items�_getval_exceptr��
_safe_repr)r8r��expr�oldvalue�newvalues     r�
_show_displayzPdb._show_display�s����_�_�(�(����7�
��",�"2�"2�"4���h��.�.�t�4���8�+��H�0D�'/�J�t�$��L�L�"&�����$�(G�"&�/�/�(�D�"A�"C�D�#5�rc���tjr>	tjtjtj�dt_|j||�|jjd�|j�|jr,|jddk(r|jj�|j�y#t$rY��wxYw)N�_pdbcmd_print_frame_status���)r�_previous_sigint_handler�signal�SIGINT�
ValueErrorr�r��appendr�r�r�)r8r�rcs   rr�zPdb.interaction�s����'�'�
4��
�
�f�m�m�S�-I�-I�J�04��,��
�
�5�)�$�	
�
�
���9�:��
�
���=�=�T�]�]�2�.�2N�N��M�M�������
���
��
�s�2C�	C!� C!c�>�|�|jt|��yy)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�V�|dddk(r|ddj�}|j}|jj}	t	|dzdd�}t
j}t
j}t
j}	|jt
_|jt
_|jt
_t|||�|t
_|t
_|t
_y#|t
_|t
_|t
_wxYw#|j�YyxYw)Nr�!�
�<stdin>�single)r�r�r�r�rrJr�r�r��exec�
_error_exc)r8r&�locals�globalsr.�save_stdout�
save_stdin�save_displayhooks        r�defaultzPdb.default�s������8�s�?�4���8�>�>�#3�D��%�%���-�-�)�)��	��4�$�;�	�8�<�D��*�*�K����J�"����
3� �J�J��	�!�[�[��
�"&�"2�"2����T�7�F�+�(��
�&��	�"2����)��
�&��	�"2����	��O�O��s%�AD�AC.�!D�.#D�D�D(c��d|vr|Sdx}}g}	tjtj|�j�D][}|\}}}}	}
|t
jk(r
|dk(r||	}}�(||k(s�.|t
jk(s�B|j|d|	d|f��]	|s|Sd}g}|D]#\}}	}
|j|||d|
�d�z�|	}�%|j||d�dj|�S#tj$r|cYSwxYw)	z�Replace the convenience variables in 'line' with their values.
           e.g. $foo is replaced by __pdb_convenience_variables["foo"].
           Note: such pattern in string literals will be skipped�$r�rrz__pdb_convenience_variables["z"]Nr)r�generate_tokensrX�StringIOr��token�OP�NAMEr��
TokenError�join)r8r&�dollar_start�
dollar_end�replace_variables�t�
token_type�token_stringr�end�_�last_end�line_piecesrns              r�_replace_convenience_variablesz"Pdb._replace_convenience_variables�s8��
�d�?��K�$&�&��z���		��-�-�b�k�k�$�.?�.H�.H�I��:;�7�
�L�%��a�����)�l�c�.A�/4�c�*�L��j�(�Z�5�:�:�-E�%�,�,�l�1�o�s�1�v�|�-T�U�
J�!��K����� 1��E�3�����t�H�U�3�8U�VZ�U[�[]�6^�^�_��H�!2�	���4��	�?�+��w�w�{�#�#���"�"�	��K�	�s�AC4�.C4�C4�4D�Dc�b�|j�s|S|j�}|d|jvr�|j|d}d}|ddD]%}|jdt	|�z|�}|dz
}�'|jddj|dd��}|j�}|d|jvr��|ddk7r[|j
d�}|dk\rE||d	zdj�}|jjd|�|d|j�}|j|�}|S)
z*Handle alias expansion and ';;' separator.rrN�%z%*� �aliasz;;�)r��splitr��replace�strr�find�lstripr��insert�rstripr)r8r&�args�ii�tmpArg�marker�nexts       r�precmdz
Pdb.precmd�s-���z�z�|��K��z�z�|���1�g����%��<�<��Q��(�D��B��q�r�(���|�|�C�#�b�'�M�&,�.���a���#��<�<��c�h�h�t�A�B�x�&8�9�D��:�:�<�D��1�g����%���7�g���Y�Y�t�_�F���{��F�1�H�I��-�-�/���
�
�$�$�Q��-��G�V�}�+�+�-���2�2�4�8���rc��|jsd|jd�r3|j|�\}}}t||�rt	||�|�St
jj||�S|j|�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.
        �_pdbcmd)	r�r��	parseliner�r�r�r�r��handle_command_def)r8r&�command�args    rr�z
Pdb.onecmd
sr���%�%����y�)�%)�^�^�D�%9�"���d��4��)�1�7�4��1�#�6�6��7�7�>�>�$��-�-��*�*�4�0�0rc��|j|�\}}}|sy|dk(rd|j|j<y|dk(ry|j|j}|r|j	|dz|z�n|j	|�	t|d|z�}|j|jvrd|j|j<yy#t$r|j}Y�JwxYw)z8Handles one command line during command list definition.F�silentTrr"�do_)r4r�r�r�r�r��AttributeErrorrr�commands_resumingr�)r8r&r�r7�cmdlist�funcs      rr5zPdb.handle_command_defs�������-���S�$����(�?�7;�D� � ��!3�!3�4��
�E�\���-�-�� 2� 2�3����N�N�3�s�7�3�;�'��N�N�3��	 ��4����-�D��=�=�D�2�2�2�9>�D�"�"�4�#5�#5�6����
�	 ��<�<�D�	 �s�C�C�Cc�2�t||j��y)N��file�rIr��r8�msgs  rr�zPdb.message9s��
�c����$rc�4�td||j��y)Nz***r@rBrCs  r�errorz	Pdb.error<s��
�e�S�t�{�{�+rc�b�d|jvri|jd<||jd|<y)Nr�)r�)r8r�rn�values    rr�zPdb.set_convenience_variableAs1��(����?�=?�E�O�O�9�:�?D����5�6�t�<rc��|j�jd�rgS	|j||||�}t	jt	j
|�dz�}|D]�}tjj|�r|j|dz��7tjj|�s�W|j�jd�s�w|j|dz���|S#t$rg}Y��wxYw)N)�:�,�*�/)�.pyz.pywrJ)r��endswith�_complete_expressionrb�globrr?r@rLr��isfile�lower)r8�textr&�begidx�endidx�ret�globs�fns        r�_complete_locationzPdb._complete_locationIs����:�:�<� � ��,��I�	��+�+�D�$���G�C��	�	�$�+�+�d�+�c�1�2���B��w�w�}�}�R� ��
�
�2��8�$�������#����
�(;�(;�O�(L��
�
�2��8�$�	�
�
���	��C�	�s�C3�3D�Dc���ttjj�D��cgc],\}}|�%t	|�j|�rt	|���.c}}Scc}}wr6)rr��
Breakpoint�
bpbynumberr'r�)r8rTr&rUrVr1�bps       r�_complete_bpnumberzPdb._complete_bpnumber\sP��%.�c�n�n�.G�.G�$H�?�5�1�b��>�c�!�f�&7�&7��&=��A��?�	?��?s�1Ac��|jsgSi|jj�|j�}d|vry|jd�}	||d}|ddD]}t	||�}�	dj|dd�dz}	t|�D�
cgc]}
|
j|d�s�|	|
z��c}
S|j�D�
cgc]}
|
j|�s�|
��c}
S#t
tf$rgcYSwxYwcc}
wcc}
w)N�.rrr�)r�r�r�r%r��KeyErrorr;r�dirr��keys)r8rTr&rUrV�ns�dottedr��partr��ns           rrPzPdb._complete_expressioncs���}�}��I�A��
�
�'�'�
@�4�+?�+?�
@���$�;��Z�Z��_�F�
�����m��"�1�R�L�D�!�#�t�,�C�)��X�X�f�S�b�k�*�S�0�F�(+�C��M�1�A�L�L����4L�F�Q�J�M�M� "�w�w�y�?�!�A�L�L��,>�A�?�?��
�n�-�
��	�
��N��@s*�	C �C7�&C7�C<�C<� C4�3C4c�t�|j|j|j�|j�yr6)r�r�r�r��r8r7s  rr�zPdb._pdbcmd_print_frame_status~s)�����t�z�z�$�-�-�8�9����rc��|s'ttjj�dz
}n	t	|�}	|j
|�||_||jvr-|j||j||j|f}nd}g|j|<d|j|<d|j|<|j}d|_d|_
	|j�d|_
||_y#|jd�YyxYw#t$r}|jd|z�Yd}~yd}~wwxYw#t$rt|r7|d|j|<|d|j|<|d	|j|<n'|j|=|j|=|j|=|jd
�Y��wxYw#d|_
||_wxYw)a:(Pdb) commands [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�r\r]�intrF�get_bpbynumberr�r�r�r�r�r�r�r�r�)r8r7�bnum�err�old_command_defs�prompt_backs      r�do_commandszPdb.do_commands�s���J��s�~�~�0�0�1�A�5�D�
��3�x��	�����%�
"����4�=�=� � $�
�
�d� 3� $� 6� 6�t� <� $� 4� 4�T� :� <�� $�� ��
�
�d��'+����t�$�%*����T�"��k�k�����!%���	&��L�L�N�&+�D�"�%�D�K��O
��
�
�M�N����	��J�J�0�3�6�7���	��*!�
	L��&6�q�&9��
�
�d�#�/?��/B��&�&�t�,�-=�a�-@��$�$�T�*��M�M�$�'��*�*�4�0��(�(��.��J�J�J�K�
	L��&+�D�"�%�D�K�sG�C3�D�D5�3D�	D2�D-�-D2�5A:F2�/F5�1F2�2F5�5Gc���|s_|jrR|jd�tjjD]$}|s�|j|j���&yd}d}d}|j
d�}|dkDrT||dzdj�}|j|�x}r|jd|�d|���y|d|j�}|jd�}	d}
|	dk\r`|d|	j�}|j|�}|s|jd	|z�y|}||	dzdj�}	t|�}n	t|�}|s|j5�}|j7||�}|rt|j9|||||
�}|r|j|�y|j;||�d
}|jd|j<|j>|j@fz�yy#t$r|jd
|z�YywxYw#t$r�	t||j j"|j$�}n	#|}YnxYw	t'|d�r|j(}|j*}
|
j,}
|
j.}|
j0}nB#|j3|�\}}}|s|jd|z�YYy|}
t|�}YnxYwY���wxYw)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   WhereNrKrr�Invalid condition r�rJz%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�r\r]�bpformatr(r)�_compile_error_messagerFr+�rfind�lookupmodulermr��evalr�r�r�r�rv�__code__�co_name�co_firstlinenorj�lineinfo�defaultFile�	checkline�	set_break�
get_breaks�numberrAr&)r8r7�	temporaryr^r"r%�cond�commarp�colonr!r�r>r.�ok�lnr&s                 r�do_breakzPdb.do_break�s��� ��{�{����@�A��.�.�3�3�B�����R�[�[�]�3�4�
�����������
���1�9��u�Q�w�x�=�'�'�)�D��1�1�$�7�7�s�7��
�
��s�C�D���f�u�+�$�$�&�C��	�	�#������A�:��6�E�{�)�)�+�H��!�!�(�+�A���
�
�7�(�B�C�����e�A�g�h�-�&�&�(�C�
��S���
%��S���4��'�'�)�H��~�~�h��/����.�.��4��D�(�K�C���
�
�3���_�_�X�t�4�R�8�����5� �i�i����"�'�'�:�;�<���I�
��
�
�+�c�1�2��
���
%���� $�
�
� 7� 7� $� 4� 4�6�D����D��%��t�Z�0�#�}�}���=�=�D� $�|�|�H�!�0�0�F�#�/�/�H��%�)-���s�);�&�R��2���
�
�$F�HK�$L�M��!�H� ��W�F��1
%�sa�>G1�H�1H�H�	K#�+I
�	K#�
I�K#�AJ�K#�-K�
K#�

K�K#�"K#c��|jjj}|dk(r|jr|j}|S)zProduce a reasonable default.z<string>)r�r�rjr�)r8r"s  rr�zPdb.defaultFile<s3���=�=�'�'�3�3���z�!�d�o�o����H��rc�(�|j|d�y)z�tbreak [ ([filename:]lineno | function) [, condition] ]

        Same arguments as break, but sets a temporary breakpoint: it
        is automatically deleted when first hit.
        rN)r�rjs  r�	do_tbreakz
Pdb.do_tbreakHs��	
�
�
�c�1�rc��d}|jd�}t|�dk(r|dj�}n$t|�dk(r|dj�}n|S|dk(r|S|jd�}|ddk(r|d=t|�dk(r|S|j�}t|�dk(r|d}n|j	|d�}|r|}|d}t||�}	|	xs|S)	N)NNN�'rr�rrar8)r%rlr�r�r{r')
r8�
identifier�failed�idstring�id�parts�fname�itemr��answers
          rr�zPdb.lineinfoRs���#���#�#�C�(���x�=�A���!��"�"�$�B�
��]�a�
��!��"�"�$�B��M�
��8�F�]�����
����8�v���a���5�z�Q���
�� � �"���u�:��?���8�D��!�!�%��(�+�A������8�D��t�U�+�����rc��t|dd�}|r|jnd}tj|||�}|s|j	d�y|j�}|r|ddk(s|dddk(s|dddk(r|j
d	�y|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�r�z"""z'''zBlank or comment)r�r��	linecache�getliner�r�rF)r8r"r%r�rXr&s      rr�z
Pdb.checkliness�����j�$�/��#(����d��� � ��6�5�9����L�L��'���z�z�|����a��C���2�A�h�%��D��!�H��$5��J�J�)�*���
rc���|j�}|D]8}	|j|�}|j�|jd|z��:y#t$r}|j|�Yd}~�[d}~wwxYw)z�enable bpnumber [bpnumber ...]

        Enables the breakpoints given as a space separated list of
        breakpoint numbers.
        z
Enabled %sN)r%rn�enabler�r�rF�r8r7r,r1r^rps      r�	do_enablez
Pdb.do_enable�si���y�y�{���A�
0��(�(��+���	�	�����\�B�.�/����
 ��
�
�3����
 ���A�	A3�A.�.A3c���|j�}|D]8}	|j|�}|j�|jd|z��:y#t$r}|j|�Yd}~�[d}~wwxYw)aOdisable 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)r%rn�disabler�r�rFr�s      r�
do_disablezPdb.do_disable�si���y�y�{���A�
1��(�(��+���
�
�����]�R�/�0����
 ��
�
�3����
 �r�c��|jdd�}	|d}|j|�x}r|jd|�d|���y		|j	|dj��}||_|s|jd|jz�y|jd|jz�y#t$rd}Y�wwxYw#t$r|jd	�Yyt$r}|j|�Yd}~yd}~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.
        r"rrur�Nrz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.�Breakpoint number expected)
r%ryrF�
IndexErrorrnr�r�r�r�r�)r8r7r,r�rpr^s      r�do_conditionzPdb.do_condition�s����y�y��a� ��	���7�D��1�1�$�7�7�s�7��
�
��s�C�D��8�
	Q��$�$�T�!�W�]�]�_�5�B��B�G�����B�R�Y�Y�N�O����C�b�i�i�O�P���	��D�	���	5��J�J�3�4��	��J�J�s�O�O��	�s/�/B/�"C�/B=�<B=�C?�C?�$C:�:C?c���|j�}	t|dj��}	|j|dj��}||_|dkDr.|dkDrd|z}nd}|jd||jfz�y|jd|jz�y#d}Y��xYw#t$r|jd�Yyt$r}|j|�Yd}~yd}~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)
r%rmr�rn�ignorer�r�r�rFr�)r8r7r,�countr^�countstrrps       r�	do_ignorez
Pdb.do_ignore�s����y�y�{��	���Q��
�
��(�E�	*��$�$�T�!�W�]�]�_�5�B��B�I��q�y��1�9�-��5�H�+�H����D�&��	�	�2�3�4����L�!�y�y�)�*��%	��E���	5��J�J�3�4��	��J�J�s�O�O��	�s(�B*�"B3�*B0�3C2�C2�C-�-C2c�Z�|s�	td�}|j�j�}|dvrUtj
jD�cgc]}|s�|��	}}|j�|D]}|jd|z��yd|vr�|jd�}|d|}||dzd}	t|�}|j||�dd}|j||�}|r|j|�yD]}|jd|z��y|j�}	|	D]9}	|j!|�}|j#|�|jd|z��;y#t$rd}Y��ZwxYwcc}w#t$rd|z}Y��wxYw#t$r}|j|�Yd}~��d}~wwxYw)	a.cl(ear) [filename:lineno | 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�yesz
Deleted %sNrJrzInvalid line number (%s))�input�EOFErrorr�rSr�r\r]�clear_all_breaksr�rzrmr��clear_breakr�rFr%rn�clear_bpbynumber)
r8r7�replyr^�bplistr1r"r%rp�
numberlists
          r�do_clearzPdb.do_clear�s����
��2�3���K�K�M�'�'�)�E���$�'*�~�~�'@�'@�G��B�"�G��G��%�%�'� �B��L�L���!2�3�!���#�:��	�	�#��A��2�A�w�H��a��c�d�)�C�
9��S�������6�:�1�=���&�&�x��8����
�
�3��
�!�B��L�L���!2�3�!���Y�Y�[�
��A�
0��(�(��+���%�%�a�(����\�B�.�/���9�
���
��H���
7�0�3�6��
7���
 ��
�
�3����
 �sG�E�
E-�E-�*E2�"F�E*�)E*�2F�F�	F*�F%�%F*c�$�|j�y)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_tracerjs  r�do_wherezPdb.do_where's��	
��� rc�|�d|cxkrt|j�ksJ�J�||_|j|jd|_|jj|_|j
|jd|j�|j|j|j�d|_y)Nrr�)	rlr�r�r�r�r�r�r�r%)r8r�s  r�
_select_framezPdb._select_frame2s����F�,�S����_�,�,�,�,�,���
��
�
�4�=�=�1�!�4��
�#�}�}�5�5����%�%�d�m�m�X�t�}�}�M����t�z�z�$�-�-�8�9���rc��|jdk(r|jd�y	t|xsd�}|dkrd}nt	d|j|z
�}|j|�y#t$r|jd|z�YywxYw)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�rFrmr��maxr��r8r7r��newframes    r�do_upz	Pdb.do_up;s����=�=�A���J�J�~�&��	����q�M�E��1�9��H��1�d�m�m�e�3�4�H����8�$���	��J�J�1�C�7�8��	�s�A%�%B�Bc��|jdzt|j�k(r|jd�y	t	|xsd�}|dkrt|j�dz
}n/t
t|j�dz
|j|z�}|j|�y#t
$r|jd|z�YywxYw)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�rlr�rFrmr��minr�r�s    r�do_downzPdb.do_downPs����=�=�1���D�J�J��/��J�J�~�&��	����q�M�E��1�9��4�:�:���*�H��3�t�z�z�?�Q�.��
�
��0E�F�H����8�$���	��J�J�1�C�7�8��	�s�B'�'C�Cc��|r7	t|�}||jjkr|jd�yd}|j|j|�y#t$r|jd|z�YywxYw)aOunt(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)rmr�rFr�r��	set_until)r8r7r%s   r�do_untilzPdb.do_untiles}���
��S�������/�/�/��
�
�)�*���F����t�}�}�f�-����
��
�
�2�S�8�9��
�s�A�A9�8A9c�$�|j�y)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�rjs  r�do_stepzPdb.do_step~s��	
�
�
��rc�:�|j|j�y)zyn(ext)

        Continue execution until the next line in the current function
        is reached or it returns.
        r)�set_nextr�rjs  r�do_nextzPdb.do_next�s��	
�
�
�d�m�m�$�rc��|rEddl}tjdd}	|j|�t_|tjddt�#t$r!}|jd|�d|���Yd}~yd}~wwxYw)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�argvr%r�rFr)r8r7r��argv0res     r�do_runz
Pdb.do_run�sj�����H�H�Q�q�M�E�
� �;�;�s�+���!�C�H�H�R�a�L��
���
��
�
�#�q�9�:���
�s�A�	A8�A3�3A8c�:�|j|j�y)zQr(eturn)

        Continue execution until the current function returns.
        r)�
set_returnr�rjs  r�	do_returnz
Pdb.do_return�s��
	
����
�
�&�rc���|js8	tjtj|j�t_|j�y#t$rY�wxYw)z^c(ont(inue))

        Continue execution, only stop when a breakpoint is encountered.
        r)r�r�r�r�rr�r��set_continuerjs  r�do_continuezPdb.do_continue�sW��
�}�}�
��M�M�&�-�-��1D�1D�E��,�	
�������
�
�
�s�7A�	A"�!A"c��|jdzt|j�k7r|jd�y	t	|�}	||j
_|j|jd|f|j|j<|j|j|j�y#t$r}|jd|z�Yd}~yd}~wwxYw#t$r|jd�YywxYw)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�rlr�rFrmr�r�r�r�)r8r7res   r�do_jumpzPdb.do_jump�s����=�=�1���D�J�J��/��J�J�B�C��	2��c�(�C�
2�*-��
�
�&�,0�J�J�t�}�}�,E�a�,H�#�,M��
�
�4�=�=�)��&�&�t�z�z�$�-�-�'@�A���
2��
�
�,�q�0�1�1��
2���	D��J�J�B�C�	D�s*�C�A.B4�4	C�=C�C�C;�:C;c�6�tjd�|jj}|j}t|j|j|j�}d|jj�z|_	|jd�	tj|j|||f�|jd�tj|j �|j"|_y#t$r|j�Y�]wxYw)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�)r8r7rr�ps     r�do_debugzPdb.do_debug�s���	���T���-�-�)�)���%�%���� � �$�*�*�d�k�k�:���T�[�[�.�.�0�0������2�3�	����Q�U�U�S�'�6�$:�;�	
���1�2����T�(�(�)��y�y����	�	��O�O��	�s�#C<�<D�Dc�2�d|_|j�y)z^q(uit) | exit

        Quit from the debugger. The program being executed is aborted.
        Tr)�_user_requested_quit�set_quitrjs  r�do_quitzPdb.do_quit�s��
%)��!��
�
��rc�T�|jd�d|_|j�y)z>EOF

        Handles the receipt of EOF as a command.
        rTr)r�r�r�rjs  r�do_EOFz
Pdb.do_EOFs$��
	
���R��$(��!��
�
��rc	���|jj}|j}|j|jz}|j
tjzr|dz}|j
tjzr|dz}t|�D]S}|j|}||vr*|j|�d|j|||�����@|j|�d���Uy)zIa(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�)r8r7�corUrhr1rns       r�do_argszPdb.do_argss���
�]�]�
!�
!���#�#���N�N�R�1�1�1��
�;�;��+�+�+��1��Q�
�;�;��/�/�/�Q�q�S���q��A��>�>�!�$�D��t�|����$�����T�
�D�0Q�R�S�����?�@�rc��d|jvr/|j|j|jdd��y|jd�y)zRretval

        Print the return value for the last return of a function.
        r��retvalzNot yet returned!N)r�r�r�rFrjs  r�	do_retvalz
Pdb.do_retval"sA��
�4�/�/�/��L�L�����)=�)=�l�)K�X�V�W��J�J�*�+rc��	t||jj|j�S#|j	��xYwr6)r|r�r�r�rrjs  r�_getvalzPdb._getval-s:��	���T�]�]�4�4�d�6J�6J�K�K��	��O�O���s	�*-�Ac��	|�+t||jj|j�St||j|j�S#t
$r'}t
d|j|�z�cYd}~Sd}~wwxYw)Nz** raised %s **)r|r�r�r�r��
BaseExceptionr4r�)r8r7r��excs    rr�zPdb._getval_except4sq��	D��}��C����!8�!8�$�:N�:N�O�O��C����%�.�.�A�A���	D��*�T�-=�-=�c�-B�B�C�C��	D�s"�,A� A�	B�A;�5B�;Bc�l�tj�}|j|j|��yr6)rJ�	exceptionrFr��r8r�s  rrzPdb._error_exc=s$���m�m�o���
�
�4�#�#�C�(�)rc��	|j|�}	|j||��y#YyxYw#|j�YyxYwr6)r�r�r)r8r7r>rDs    r�
_msg_val_funczPdb._msg_val_funcAsD��	��,�,�s�#�C�	��L�L��c��#��	���	��O�O��s�,�3�0�Ac	��	t|�S#t$r+}td|�d|j|��d��cYd}~Sd}~wwxYw)Nz	*** repr(z
) failed: z ***)r�rbr4r�)r8r�r�res    rr�zPdb._safe_reprKsJ��	P���9����	P��9�T�F�*�T�5E�5E�a�5H�4I��N�O�O��	P�s�

�	A� <�A�Ac�0�|j|t�y)zAp expression

        Print the value of the expression.
        N)rr�rjs  r�do_pzPdb.do_pQs��
	
���3��%rc�D�|j|tj�y)zIpp expression

        Pretty-print the value of the expression.
        N)r�pprint�pformatrjs  r�do_ppz	Pdb.do_ppXs��
	
���3����/rc� �d|_d}|r�|dk7r	d|vrQ|jd�\}}t|j��}t|j��}||kr.||z}n(t|j��}t	d|dz
�}nD|j�|dk(r$t	d|jjdz
�}n|jdz}|�|dz}|jjj}|jd	�r7|jjjd
�}t|t �r|}|j#|�}	t%j&||jj�}|j)||dz
||||j�t+|t-|��|_t-|�|kr|j/d�yy#t
$r|j
d|z�YywxYw#t0$rYywxYw)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*NrarKr�r��
z<frozenrRz[EOF])r�r%rmr�r�r�rFr%r�r�r�rjr�r�r��
isinstancer'�get_file_breaksr��getlines�_print_linesr�rlr�r�)r8r7�last�firstr"�tmp�	breaklist�liness        r�do_listzPdb.do_listcs���������3�#�:�

��#�:�"%�)�)�C�.�K�E�4�����
�.�E��t�z�z�|�,�D��e�|�$�t�|����	�	��,�E���5�1�9�-�E���[�[�
 �C�3�J���4�=�=�1�1�A�5�6�E��K�K�!�O�E��<��2�:�D��=�=�'�'�3�3�����y�)��-�-�)�)�-�-�j�9�C��#�s�#����(�(��2�	�	��&�&�x����1H�1H�I�E����e�E�!�G�D�1�5�)�"�m�m�
-��d�C��J�/�D�K��5�z�D� ����W�%�!��-�
��
�
�2�S�8�9��
��0!�	��	�s%�A=G�BH�G>�=G>�	H
�H
c�.�|jjj}|j|�}	|j	|j�\}}|j||||j�y#t
$r}|j
|�Yd}~yd}~wwxYw)z]ll | longlist

        List the whole source code for the current function or frame.
        N)r�r�rjr�_getsourcelinesrrFr)r8r7r"rrr%rps       r�do_longlistzPdb.do_longlist�s���
�=�=�'�'�3�3���(�(��2�	�	� �0�0����?�M�E�6�	
���%���D�M�M�B���	��J�J�s�O���	�s�A0�0	B�9B�Bc���	|j|�}	|j|�\}}|j||�y#YyxYw#ttf$r}|j	|�Yd}~yd}~wwxYw)z_source expression

        Try to get source code for the given object and display it.
        N)r�rr�	TypeErrorrFr)r8r7r�rr%rps      r�	do_sourcez
Pdb.do_source�sn��
	��,�,�s�#�C�	� �0�0��5�M�E�6�	
���%��(��	�����#�	��J�J�s�O���	�s�;�A�?�A,�A'�'A,c�v�|r)|j}|jj|d�}ndx}}t||�D]{\}}t	|�jd�}	t
|	�dkr|	dz
}	||vr|	dz
}	n|	dz
}	||k(r|	dz
}	n
||k(r|	dz
}	|j|	dz|j�z��}y	)
zPrint a range of lines.r�r��r"�Bz->z>>�	N)	r�r�r�rr'�rjustrlr�r+)
r8rrrwr��current_lineno�
exc_linenor%r&�ss
          rrzPdb._print_lines�s����"�^�^�N����+�+�E�2�6�J�*,�,�N�Z�%�e�U�3�L�F�D��F��!�!�!�$�A��1�v��z��S�������S����S�����'��T�	���:�%��T�	���L�L��T��D�K�K�M�1�2�4rc���	|j|�}d}	|jj}|r|j	d|j
z�y	|j}|r|j	d|j
z�y|jtur,|j	d|j�d|j���y|j	t|��y#YyxYw#t$rY��wxYw#t$rY��wxYw)zCwhatis expression

        Print the type of the argument.
        Nz	Method %szFunction %szClass ra)
r�rvr}rbr�r~rF�typerr)r8r7rHr.s    r�	do_whatisz
Pdb.do_whatis�s���
	��L�L��%�E���	��>�>�*�*�D���L�L��t�|�|�3�4��	��>�>�D���L�L�����5�6���?�?�d�"��L�L�%�*:�*:�E�<N�<N�O�P�����T�%�[�!��3	���
�	��	���	��	�s.�C�C�C*�C�	C'�&C'�*	C6�5C6c	�D�|s�|jrt|jd�|jj|ji�j	�D]+\}}|j|�d|j||�����-y|jd�y|j
|�x}r|jd|�d|���y|j|�}||jj|ji�|<|jd|�d|j||����y)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�z No expression is being displayedzUnable to display r�N)
r�r�r�r�r�r�ryrFr��
setdefault)r8r7�keyrDrps     r�
do_displayzPdb.do_display�s����������4�5� $��� 3� 3�D�M�M�2� F� L� L� N�H�C���L�L�S�$�/�/�#�s�2K�!L�M�!O����?�@��1�1�#�6�6�s�6��
�
��c�B�C��)�)�#�.��EH����*�*�4�=�=�"�=�c�B�����d�o�o�c�3�6O�P�Qrc���|r)	|jj|ji�|=y|jj|jd�y#t$r|j	d|z�YywxYw)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�rbrFr�rjs  r�do_undisplayzPdb.do_undisplaysf���
6��O�O�'�'��
�
�r�:�3�?�
�O�O����
�
�t�4���
6��
�
�.��4�5�
6�s�'A�A3�2A3c��|jj|ji�D�cgc]}|j|�r|��c}Scc}wr6)r�r�r�r�)r8rTr&rUrVres      r�complete_undisplayzPdb.complete_undisplaysB���?�?�.�.�t�}�}�b�A�'�a��<�<��%��'�	'��'s�Ac�z�i|jj�|j�}tjd|��y)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)r8r7res   r�do_interactzPdb.do_interact"s2��A��
�
�'�'�
@�4�+?�+?�
@���
�
�o�R�0rc���|j�}t|�dk(rNt|jj	��}|D]%}|j|�d|j|����'yt|�dk(rT|d|jvr*|j|d�d|j|d���y|j
d|d�d��ydj|dd�|j|d<y)aIalias [name [command]]

        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 'r�r")r%rl�sortedr�rdr�rFr)r8r7r,rdr#s     r�do_aliaszPdb.do_alias+s���2�y�y�{���t�9��>��$�,�,�+�+�-�.�D������%����e�1D�E�F����t�9��>��A�w�$�,�,�&����$�q�'�4�<�<��Q��3H�I�J��
�
�_�T�!�W�I�Q�7�8�$'�H�H�T�!�"�X�$6�D�L�L��a��!rc��|j�}t|�dk(ry|d|jvr|j|d=yy)z:unalias name

        Delete the specified alias.
        rN)r%rlr�)r8r7r,s   r�
do_unaliaszPdb.do_unaliasRsA��
�y�y�{���t�9��>�6���7�d�l�l�"����T�!�W�%�#rc�d�|jD�cgc]}|j|�s�|��c}Scc}wr6)r�r�)r8rTr&rUrV�as      r�complete_unaliaszPdb.complete_unalias\s%���<�<�>�a�1�<�<��+=��>�>��>s�-�-)r�r�r�r�r�r�c�h�	|jD]}|j|��y#t$rYywxYwr6)r�r�r�)r8�frame_linenos  rr�zPdb.print_stack_traceks5��	� $�
�
���&�&�|�4�!+�� �	��	�s�"%�	1�1c�|�|\}}||jurd}nd}|j||j||�z�y)Nz> z  )r�r��format_stack_entry)r8r?�
prompt_prefixr�r%r�s      rr�zPdb.print_stack_entryrsF��$�
��v��D�M�M�!��F��F����V��,�,�\�=�I�J�	Krc��|s tjj||�S		t|d|z�}|�S#t$rt|d|z�}YnwxYw	t
jjdk\r|jd|z�y|j�|jd|z�y|j|j|j��y#t$r|jd|z�YywxYw)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_r:r$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�optimizerFr	r��_help_message_from_doc)r8r7�topicr6s    rrEzPdb.do_help}s�����7�7�?�?�4��-�-�	G�
5���g��m�4���w���!�
5�!�$����4��
5����y�y�!�!�Q�&��
�
�6�8;�<�=�����&��
�
�C�c�I�J���L�L��4�4�W�_�_�E�F���	/��J�J�'�#�-�.�	/�s'�;�A�C�A�C�C8�7C8c�r�|j|jjxsdj��y)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, e.g.:
        (Pdb) ! n=42
        (Pdb)

        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)
        rN)r��	help_execr	r�r7s rrKz
Pdb.help_exec�s(��	
���d�n�n�,�,�2��9�9�;�<rc��t�yr6)rr7s r�help_pdbzPdb.help_pdb�s���rc�V�tjj|�r!tjj|�r|Stjj	t
jd|�}tjj|�r |j
|�|jk(r|Stjj|�\}}|dk(r|dz}tjj|�r|St
jD]�}tjj|�r5tj|�}tjj|�r�5tjj	||�}tjj|�s��|cSy)z�Helper function for break/clear parsing -- may be overridden.

        lookupmodule() translates (possibly incomplete) file or module name
        into an absolute file name.
        rrrNN)r?r@�isabsrHrrJr�r��splitext�islink�readlink)r8r"r��root�extrM�fullnames       rr{zPdb.lookupmodule�s���7�7�=�=��"������x�(@��O��G�G�L�L����!��h�/���G�G�N�N�1��$�,�,�q�/�T�_�_�"D��H��G�G�$�$�X�.�	��c��"�9��%�'�H�
�7�7�=�=��"��O��x�x�G��'�'�.�.��)��+�+�g�.���'�'�.�.��)��w�w�|�|�G�X�6�H��w�w�~�~�h�'��� �r�targetc��d|_d|_|j|j�|_ddl}|jj�|jj|j�|j|j�y)NTFr)r�r�r�r"r�rQ�__dict__r��updaterVr
r.)r8rVrQs   r�_runzPdb._run�si��%)��!�$)��!��,�,�v���7���
	������!���� � ��!1�!1�2�������rr�c�N�tj|�dj�S)Nr�)rc�format_exception_onlyr�rs  rr�zPdb._format_exc�s!���.�.�s�3�B�7�=�=�?�?rc��	t|dd�y#t$r$}t|j|��cYd}~Sd}~wwxYw)z=Return the error message as string if compiling `expr` fails.rr|Nr)r�SyntaxErrorr4r�)r8r�r�s   rryzPdb._compile_error_message�s@��	0��D�)�V�,����	0���)�)�#�.�/�/��	0�s�
�	=�8�=�=c�R�tj|�\}}td|�}||fS)Nr)r��getsourcelinesr�)r8r�rr%s    rrzPdb._getsourcelines�s-�� �.�.�s�3�
��v��Q�����f�}�rc��|j�j�D�cgc]}|j���}}|syd|vr|jd�}nd}g}dt	|j
�z}t
|�D].\}}|dk(rd}n
||krd}nd}|j||z|z��0dj|�Scc}w)	NzNo help message found.rrr"rzUsage: z       r)	r+�
splitlinesr��indexrlr�rr�r)	r8�docr&r�	usage_end�	formatted�indentr1r�s	         rrHzPdb._help_message_from_doc�s���*-�*�*�,�*A�*A�*C�D�$�����D��D��+�
��;����B��I��I��	��s�4�;�;�'�'�� ��'�G�A�t��A�v�"���Y��"�������V�f�_�t�3�4�(��y�y��#�#��#Es�B<)�tabNNNFT)rr6)r
N)�rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr1r�r5r�rFr�rZr_rPr�rs�complete_commandsr�r��do_b�complete_break�
complete_br��complete_tbreakr�r�r��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�rrr�rr�complete_print�
complete_p�complete_ppr�do_lr�do_llr�complete_sourcerr)�complete_whatisr-�complete_displayr/r1r5r8r:r=r<r��line_prefixr�rE�do_hrKrMr{rr^r;rZr�r�ryrrHr
rrrr�s���#��HL�(,�,"�^����4*�*��0&�/�(
6�D��,$��*$�B�:1� �8%�,�
E��&?�@�6�Q&�f+��^<�B��D�'�N�#�J��)�O� �B�,0� )�O�1�&*��Q�:,�� *�D)�O�.0�^
�E�'�N�$�K�!��D��E��%�&�D�%�&�D��.�F���D���D��(�J���D��"!� �D�7�2�8�D�!�**�N���D��G��A� �D�,�
�E��D�*��P�&�0�*�N�%�J�&�K�6�n�D�C�
�E�)� +�O�3�* "�D+�O�R�.,��
5�'�1�%7�N&�?�/���=H�K�G�8�D�=� �
�0�5��
�!=�>��(@�}�@���$rr)"r�where�down�up�break�tbreakr�r�r�r��	conditionr��stepr0�until�jump�returnr�r
�continuer*�longlistr,r��pp�whatis�source�display�	undisplayr4r#�unalias�debug�quitr:z

c�:�t�j|||�y)a�Execute the *statement* (given as a string or a code object)
    under debugger control.

    The debugger prompt appears before any code is executed; you can set
    breakpoints and type continue, or you can step through the statement
    using step or next.

    The optional *globals* and *locals* arguments specify the
    environment in which the code is executed; by default the
    dictionary of the module __main__ is used (see the explanation of
    the built-in exec() or eval() functions.).
    N)rr
��	statementrrs   rr
r
s���E�I�I�i��&�)rc�8�t�j|||�S)z�Evaluate the *expression* (given as a string or a code object)
    under debugger control.

    When runeval() returns, it returns the value of the expression.
    Otherwise this function is similar to run().
    )rr)�
expressionrrs   rrr)s���5�=�=��W�f�5�5rc��t|||�yr6)r
r�s   rrr2s���	�7�F�#rc�6�t�j|i|��S)z�Call the function (a function or method object, not a string)
    with the given arguments.

    When runcall() returns, it returns whatever the function call
    returned. The debugger prompt appears as soon as the function is
    entered.
    )rr)r,�kwdss  rrr6s���3�5�=�=�$�'�$�'�'r)�headerc��t�}|�|j|�|jtj�j
�y)a(Enter the debugger at the calling stack frame.

    This is useful to hard-code a breakpoint at a given point in a
    program, even if the code is not otherwise being debugged (e.g. when
    an assertion fails). If given, *header* is printed to the console
    just before debugging begins.
    N)rr�rrJ�	_getframe�f_back)r��pdbs  rrr@s9���%�C�
������F���C�M�M�#�-�-�/�(�(�)rc��|�"tj�}|�|j}|�td��t	�}|j�|j
d|�y)z�Enter post-mortem debugging of the given *traceback* object.

    If no traceback is given, it uses the one of the exception that is
    currently being handled (an exception must be being handled if the
    default is to be used).
    NzAA valid traceback must be passed if no exception is being handled)rJr�
__traceback__r�rr�r�)rr�r�s   rrrOs[��	�y��m�m�o���?��!�!�A��y��6�7�	7�	��A��G�G�I��M�M�$��rc��ttd�rtjj}ntj}t|�y)zIEnter post-mortem debugging of the traceback found in sys.last_traceback.�last_excN)r�rJr�r��last_tracebackr)r�s rrrds-���s�J��
�\�\�
'�
'��
�
�
����Orzimport x; x.main()c�"�tt�yr6)r
�TESTCMDr
rr�testr�qs	����Lrc�6�ddl}|jt�yr))�pydoc�pagerr	)r�s rrrus���	�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	��ddl}|jtjdddddg�\}}|s$tt�tj
d�t
d�|D��r#tt�tj
�|D��cgc]\}}|dvs�|��}}}t
d	�|D��}|rtnt}||d�}|j�|tjddt�}	|	jj|�		|	j|�|	jrytd
��,cc}}w#t$r>td|d�td
dj!tjdd�z�Y�Mt"$r"}
tdd��t|
�Yd}
~
�rd}
~
wt$$r,t'j(�tj
d�Y��t*$re}
t'j(�td�td�|
j,}|	j.d|�td|zdz�Yd}
~
��d}
~
wwxYw)Nrrzmhc:rzcommand=r$c3�*K�|]\}}|dv���
y�w))z-hz--helpNr
��.0�opt�optargs   r�	<genexpr>zmain.<locals>.<genexpr>�s����
;�{�s�F�3�"�"�
;���)z-cz	--commandc3�*K�|]\}}|dv���
y�w))z-mNr
r�s   rr�zmain.<locals>.<genexpr>�s����A�[�S�&�3�&�=�A�r�z*The program finished and will be restarted�
Restartingzwith arguments:r"r"z/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�rZr�rr�
SystemExitr^rcrdr�r�r�)r��optsr,r�r�r��module_indicatedrCrVr�rers            r�mainr��s�������s�x�x���|�V�f�j�5I�J�J�D�$��
�f�
������
�
;�d�
;�;�
�f�
����
�*.�M�;�3��#�9L�2L��M�H�M��A�D�A�A��+�-��C�
��a��\�F�
�L�L�N��C�H�H�Q�K��%�C��K�K���x� �
�	(��C�H�H�V���'�'���>�?���!N��,�	1��,��(9�:��$����#�(�(�1�2�,�/�/�0��	��C��M��!�H�H���	����!��H�H�Q�K��	(����!��F�G��E�F����A��C�O�O�D�!�$��7�&�@�&�'�
(�
(��
	(�sD�E�E�E�6E�AI�I�F3�35I�*I�2AI�IrQ)NNr6)4r	r?rXrrJr�r�r+r.rQrr	r�r�rrzrcr��typingrrbr�__all__r'r2r'r4r;r^r�r�r�r�_help_order�_commandr�r�rKr
rrrrrrr�r�rr�r�rr�r
rr�<module>r�si��?�F
�	�	�
�
�
�
����
�
�������	�i�	�"���
��C��%E�C�%E�P'
�C�'
�^��l$�#�'�'�3�7�7�l$�`1���K� ���7�3��� 0�1�9�9�?�?�A�F�J�J�� ��s�}�}�$�$�$�G��X�

*�6�$�(��*��*�����
�� 4(�p�z����C�H�H�J�r

Hacked By AnonymousFox1.0, Coded By AnonymousFox