IP : 3.21.106.213 Hostname : host45.registrar-servers.com Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Disable Function : None :) OS : Linux PATH: / home/ ./ ../ lib64/ pgsql/ ../ python3.8/ unittest/ ./ ./ ../ __pycache__/ bdb.cpython-38.opt-2.pyc/ /

U

e5d8}�@s�ddlZddlZddlZddlmZmZmZdddgZeeBeBZGdd�de �Z
Gdd�d�Z dd �Z Gd
d�d�Z
d d �Zd
d�ZGdd�de �Zdd�Zdd�Zdd�ZdS)�N)� CO_GENERATOR� CO_COROUTINE�CO_ASYNC_GENERATOR�BdbQuit�Bdb�
Breakpointc@s eZdZdS)rN)�__name__�
__module__� __qualname__�r r �/usr/lib64/python3.8/bdb.pyr
sc@sreZdZdZdd�Zdd�Zdd�Zdd �Zd
d �Zd d
�Zdd�Z dd�Z
dd�Z dd�Z dd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd[d%d&�Zd\d'd(�Zd)d*�Zd+d,�Zd-d.�Zd]d/d0�Zd1d2�Zd3d4�Zd^d6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Z d@dA�Z!dBdC�Z"dDdE�Z#dFdG�Z$dHdI�Z%dJdK�Z&dLdM�Z'd_dOdP�Z(d`dQdR�Z)dadSdT�Z*dUdV�Z+dWdX�Z,dYe,_-dS)brNcCs(|r t|�nd|_i|_i|_d|_dS�N)�set�skip�breaks�fncache�frame_returning)�selfrr r r �__init__sz Bdb.__init__cCsR|d|dd�dkr|S|j�|�}|sNtj�|�}tj�|�}||j|<|S)N�<�����>)r�get�os�path�abspath�normcase)r�filename�canonicr r r r%s   
z Bdb.canoniccCs&ddl}|��d|_|�dd�dS)Nr)� linecache�
checkcache�botframe�
_set_stopinfo)rr r r r �reset6sz Bdb.resetcCs�|jr
dS|dkr|�|�S|dkr0|�||�S|dkrD|�||�S|dkrX|�||�S|dkrf|jS|dkrt|jS|dkr�|jStdt|��|jS) N�lineZcall�returnZ exceptionZc_callZ c_exceptionZc_returnz*bdb.Bdb.dispatch: unknown debugging event:)�quitting�
dispatch_line�
dispatch_call�dispatch_return�dispatch_exception�trace_dispatch�print�repr)r�frameZevent�argr r r r,=s$
   zBdb.trace_dispatchcCs.|�|�s|�|�r(|�|�|jr(t�|jSr
)� stop_here�
break_here� user_liner'rr,�rr/r r r r(hs

zBdb.dispatch_linecCsd|jdkr|j|_|jS|�|�s0|�|�s0dS|jrH|jjt@rH|jS|� ||�|j
r^t �|jSr
) r"�f_backr,r1�break_anywhere� stopframe�f_code�co_flags�GENERATOR_AND_COROUTINE_FLAGS� user_callr'r�rr/r0r r r r)ts
 zBdb.dispatch_callcCs||�|�s||jkrv|jr,|jjt@r,|jSz||_|�||�W5d|_X|j rVt
�|j|krv|j dkrv|� dd�|jS�Nr)
r1� returnframer7r8r9r:r,r� user_returnr'r�
stoplinenor#r<r r r r*�s zBdb.dispatch_returncCs�|�|�rF|jjt@r.|dtkr.|ddks�|�||�|jr�t�nD|jr�||jk r�|jjjt@r�|dtt fkr�|�||�|jr�t�|j
S)Nr�) r1r8r9r:�
StopIteration�user_exceptionr'rr7�
GeneratorExitr,r<r r r r+�s$
 
�
�  �� zBdb.dispatch_exceptioncCs.|dkr dS|jD]}t�||�rdSqdS�NFT)r�fnmatch)rZ module_name�patternr r r �is_skipped_module�s 
 zBdb.is_skipped_modulecCsN|jr|�|j�d��rdS||jkr@|jdkr4dS|j|jkS|jsJdSdS)NrFrT)rrH� f_globalsrr7r@�f_linenor4r r r r1�s�

 z
Bdb.stop_herecCs�|�|jj�}||jkrdS|j}||j|krJ|jj}||j|krJdSt|||�\}}|r�|j|_|r�|j r�|�
t |j��dSdSdSrE) rr8� co_filenamerrJ�co_firstlineno� effective�numberZ currentbp� temporary�do_clear�str)rr/r�lineno�bp�flagr r r r2�s

zBdb.break_herecCs td��dS)Nz)subclass of bdb must implement do_clear())�NotImplementedError)rr0r r r rP�sz Bdb.do_clearcCs|�|jj�|jkSr
)rr8rKrr4r r r r6�szBdb.break_anywherecCsdSr
r )rr/Z
argument_listr r r r;sz
Bdb.user_callcCsdSr
r r4r r r r3sz
Bdb.user_linecCsdSr
r )rr/Z return_valuer r r r? szBdb.user_returncCsdSr
r )rr/�exc_infor r r rC
szBdb.user_exceptionrcCs||_||_d|_||_dS�NF)r7r>r'r@)rr7r>r@r r r r#szBdb._set_stopinfocCs$|dkr|jd}|�|||�dS)Nr)rJr#)rr/rRr r r � set_until"s
z
Bdb.set_untilcCs0|jr |jj}|r |js |j|_|�dd�dSr
)rr5�f_tracer,r#)rZ caller_framer r r �set_step*s

z Bdb.set_stepcCs|�|d�dSr
)r#r4r r r �set_next6sz Bdb.set_nextcCs.|jjt@r|�|dd�n|�|j|�dSr=)r8r9r:r#r5r4r r r �
set_return:s zBdb.set_returncCsL|dkrt��j}|��|r4|j|_||_|j}q|��t�|j�dSr
) �sys� _getframer5r$r,rYr"rZ�settracer4r r r � set_traceAs
z
Bdb.set_tracecCsH|�|jdd�|jsDt�d�t��j}|rD||jk rD|`|j}q*dSr=)r#r"rr]r_r^r5rYr4r r r � set_continuePs

zBdb.set_continuecCs"|j|_d|_d|_t�d�dS�NT)r"r7r>r'r]r_�rr r r �set_quit_sz Bdb.set_quitFc
Csb|�|�}ddl}|�||�}|s.d||fS|j�|g�}||krN|�|�t|||||�} dS)NrzLine %s:%d does not exist)rr �getliner�
setdefault�appendr)
rrrRrO�cond�funcnamer r%�listrSr r r � set_breakps
  
z
Bdb.set_breakcCs4||ftjkr|j|�|�|j|s0|j|=dSr
)r�bplistr�remove�rrrRr r r �
_prune_breaks�s
zBdb._prune_breakscCsj|�|�}||jkrd|S||j|kr6d||fStj||fdd�D] }|��qL|�||�dS)N�There are no breakpoints in %szThere is no breakpoint at %s:%d)rrrrl�deleteMero)rrrRrSr r r � clear_break�s

 
 zBdb.clear_breakc
CsZz|�|�}Wn.tk
r<}zt|�WY�Sd}~XYnX|��|�|j|j�dSr
)�get_bpbynumber�
ValueErrorrQrqro�filer%)rr0rS�errr r r �clear_bpbynumber�szBdb.clear_bpbynumbercCsX|�|�}||jkrd|S|j|D]$}tj||f}|D] }|��q<q&|j|=dS)Nrp)rrrrlrq)rrr%ZblistrSr r r �clear_all_file_breaks�s

 zBdb.clear_all_file_breakscCs,|js
dStjD]}|r|��qi|_dS)NzThere are no breakpoints)rr�
bpbynumberrq)rrSr r r �clear_all_breaks�s

zBdb.clear_all_breakscCs�|s td��z t|�}Wn"tk
r:td|�d�YnXztj|}Wn"tk
rltd|�d�YnX|dkr�td|��|S)NzBreakpoint number expectedz Non-numeric breakpoint number %sz!Breakpoint number %d out of rangezBreakpoint %d already deleted)rt�intrry�
IndexError)rr0rNrSr r r rs�s  zBdb.get_bpbynumbercCs"|�|�}||jko ||j|kSr
�rrrnr r r � get_break�s

 �z
Bdb.get_breakcCs4|�|�}||jkr0||j|kr0tj||fp2gSr
)rrrrlrnr r r �
get_breaks�s

 � ��zBdb.get_breakscCs&|�|�}||jkr|j|SgSdSr
r})rrr r r �get_file_breaks�s


zBdb.get_file_breakscCs|jSr
)rrcr r r �get_all_breaks�szBdb.get_all_breakscCs�g}|r|j|kr|j}|dk rD|�||jf�||jkr<qD|j}q|��tdt|�d�}|dk r�|�|j|j f�|j}q^|dkr�tdt|�d�}||fS)Nrr)
�tb_frame�tb_nextrgrJr"r5�reverse�max�len� tb_lineno)r�f�t�stack�ir r r � get_stack�s 
z
Bdb.get_stack�: c Cs�ddl}ddl}|\}}|�|jj�}d||f}|jjrH||jj7}n|d7}|d7}d|jkr�|jd} |d7}||�| �7}|�|||j �}
|
r�|||

�7}|S)Nrz%s(%r)z<lambda>z()Z
__return__z->) r �reprlibrr8rK�co_name�f_localsr.rerI�strip) rZ frame_linenoZlprefixr r�r/rRr�s�rvr%r r r �format_stack_entrys  

zBdb.format_stack_entryc Cs�|dkrddl}|j}|dkr"|}|��t|t�r@t|dd�}t�|j�z*zt
|||�Wnt k
rrYnXW5d|_ t�d�XdS)Nrz<string>�execT) �__main__�__dict__r$�
isinstancerQ�compiler]r_r,r'r�r)r�cmd�globals�localsr�r r r �run5s
  
zBdb.runc Csz|dkrddl}|j}|dkr"|}|��t�|j�z,zt|||�WW�Stk
r^YnXW5d|_t�d�XdS)NrT) r�r�r$r]r_r,r'�evalr)r�exprr�r�r�r r r �runevalKs 
z Bdb.runevalcCs|�|||�dSr
)r�)rr�r�r�r r r �runctx_sz
Bdb.runctxc Os�t|�dkr|^}}}nV|s&td��nHd|krZ|�d�}|^}}ddl}|jdtdd�ntdt|�d��|��t�|j �d}z(z|||�}Wnt k
r�YnXW5d |_
t�d�X|S)
NrAz6descriptor 'runcall' of 'Bdb' object needs an argument�funcrz0Passing 'func' as keyword argument is deprecated)�
stacklevelz7runcall expected at least 1 positional argument, got %drT) r�� TypeError�pop�warnings�warn�DeprecationWarningr$r]r_r,r'r)�args�kwdsrr�r��resr r r �runcallfs2  

�
� 
 z Bdb.runcallz($self, func, /, *args, **kwds))N)r)N)N)FNN)r�)NN)NN).rr r
rrr$r,r(r)r*r+rHr1r2rPr6r;r3r?rCr#rXrZr[r\r`rardrkrorrrwrxrzrsr~rr�r�r�r�r�r�r�r��__text_signature__r r r r rsZ
+  

 
�




 


cCst���dSr
)rr`r r r r r`�sr`c@sVeZdZdZiZdgZddd�Zdd�Zdd �Zd
d �Z dd d
�Z
dd�Z dd�Z dS)rrNFcCs�||_d|_||_||_||_||_d|_d|_d|_t j
|_ t j
d7_
|j �
|�||f|jkr||j||f�
|�n|g|j||f<dS)NTrr)ri�func_first_executable_linerur%rOrh�enabled�ignore�hitsr�nextrNryrgrl)rrur%rOrhrir r r r�s zBreakpoint.__init__cCs>|j|jf}d|j|j<|j|�|�|j|s:|j|=dSr
)rur%ryrNrlrm)r�indexr r r rq�s
  
zBreakpoint.deleteMecCs
d|_dSrb�r�rcr r r �enable�szBreakpoint.enablecCs
d|_dSrWr�rcr r r �disable�szBreakpoint.disablecCs"|dkrtj}t|��|d�dS)N)ru)r]�stdoutr-�bpformat)r�outr r r �bpprint�szBreakpoint.bpprintcCs�|jr d}nd}|jr |d}n|d}d|j||j|jf}|jrT|d|jf7}|jrj|d|jf7}|jr�|jdkr�d }nd
}|d |j|f7}|S) Nzdel zkeep zyes zno z%-4dbreakpoint %s at %s:%dz
stop only if %sz
ignore next %d hitsrr��z"
breakpoint already hit %d time%s)rOr�rNrur%rhr�r�)rZdispZretZssr r r r��s(
�
zBreakpoint.bpformatcCsd|j|j|jfS)Nzbreakpoint %s at %s:%s)rNrur%rcr r r �__str__�szBreakpoint.__str__)FNN)N)
rr r
r�rlryrrqr�r�r�r�r�r r r r r�s


cCsN|js|j|jkrdSdS|jj|jkr,dS|js:|j|_|j|jkrJdSdSrE)rir%rJr8r�r�)�br/r r r �
checkfuncnames  r�cCs�tj||f}|D]�}|jsqt||�s*q|jd7_|jsh|jdkrZ|jd8_qq�|dfSqzBt|j|j|j �}|r�|jdkr�|jd8_n|dfWSWq|dfYSXqdS)NrrTF)NN)
rrlr�r�r�rhr�r�rIr�)rur%r/Z possiblesr��valr r r rM#s*


rMc@s,eZdZdd�Zdd�Zdd�Zdd�Zd S)
�TdbcCs |jj}|sd}td||�dS)N�???z+++ call)r8r�r-)rr/r��namer r r r;Tsz
Tdb.user_callcCsTddl}|jj}|sd}|�|jj�}|�||j|j�}td||j|d|� ��dS)Nrr�z+++�:)
r r8r�rrKrerJrIr-r�)rr/r r��fnr%r r r r3Xsz
Tdb.user_linecCstd|�dS)Nz
+++ return�r-)rr/Zretvalr r r r?_szTdb.user_returncCstd|�|��dS)Nz
+++ exception)r-ra)rr/Z exc_stuffr r r rCas
zTdb.user_exceptionN)rr r
r;r3r?rCr r r r r�Ssr�cCs&td|d�t|d�}td|�dS)Nzfoo(�)�
z bar returned)r-�bar)�n�xr r r �fooes  r�cCstd|d�|dS)Nzbar(r�rAr�)�ar r r r�js r�cCst�}|�d�dS)Nzimport bdb; bdb.foo(10))r�r�)r�r r r �testnsr�)rFr]r�inspectrrr�__all__r:� Exceptionrrr`rr�rMr�r�r�r�r r r r �<module>s&
 {t"0