Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/idlelib/__pycache__/debugger_r.cpython-310.pyc
o

�9j�/�@sdZddlZddlZddlmZdZdadZiZiZ	iZ
iZdd�Zdd	�Z
Gd
d�d�ZGdd
�d
�Zdd�ZGdd�d�ZGdd�d�ZGdd�d�ZGdd�d�ZGdd�d�Zdd�Zdd�Zdd�Zd d!�Zed"kr~dd#lmZed$d%d&d'�dSdS)(a�Support for remote Python debugging.

Some ASCII art to describe the structure:

       IN PYTHON SUBPROCESS          #             IN IDLE PROCESS
                                     #
                                     #        oid='gui_adapter'
                 +----------+        #       +------------+          +-----+
                 | GUIProxy |--remote#call-->| GUIAdapter |--calls-->| GUI |
+-----+--calls-->+----------+        #       +------------+          +-----+
| Idb |                               #                             /
+-----+<-calls--+------------+         #      +----------+<--calls-/
                | IdbAdapter |<--remote#call--| IdbProxy |
                +------------+         #      +----------+
                oid='idb_adapter'      #

The purpose of the Proxy and Adapter classes is to translate certain
arguments and return values that cannot be transported through the RPC
barrier, in particular frame and traceback objects.

�N)�debugger�idb_adapter�gui_adaptercCst|�}|t|<|S�N)�id�
frametable)�frame�fid�r
�)/usr/lib/python3.10/idlelib/debugger_r.py�
wrap_frame(srcCsJ|durdS|d}t|tj�sJ�t|�}|t|<|d|d|f}|S)z0replace info[2], a traceback instance, by its IDN�r�)�
isinstance�types�
TracebackTyper�tracebacktable)�info�	traceback�traceback_id�
modified_infor
r
r�	wrap_info-src@seZdZdd�Zddd�ZdS)�GUIProxycC�||_||_dSr)�conn�oid)�selfr�gui_adap_oidr
r
r�__init__;�
zGUIProxy.__init__NcCs&|j�|jd|t|�t|�fi�dS)N�interaction)r�
remotecallrrr)r�messagerrr
r
rr ?s�zGUIProxy.interactionr��__name__�
__module__�__qualname__rr r
r
r
rr9src@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)S)*�
IdbAdaptercCs
||_dSr)�idb)rr(r
r
rrHs
zIdbAdapter.__init__cC�|j��dSr)r(�set_step�rr
r
rr*M�zIdbAdapter.set_stepcCr)r)r(�set_quitr+r
r
rr-Pr,zIdbAdapter.set_quitcCr)r)r(�set_continuer+r
r
rr.Sr,zIdbAdapter.set_continuecC�t|}|j�|�dSr)rr(�set_next�rr	rr
r
rr0V�zIdbAdapter.set_nextcCr/r)rr(�
set_returnr1r
r
rr3Zr2zIdbAdapter.set_returncCsFt|}|durd}nt|}|j�||�\}}dd�|D�}||fS)NcSsg|]
\}}t|�|f�qSr
)r)�.0�frame2�kr
r
r�
<listcomp>esz(IdbAdapter.get_stack.<locals>.<listcomp>)rrr(�	get_stack)rr	�tbidr�tb�stack�ir
r
rr8^szIdbAdapter.get_stackcCsddl}|j�||j�dS)Nr)�__main__r(�run�__dict__)r�cmdr=r
r
rr>hszIdbAdapter.runcC�|j�||�}|Sr)r(�	set_break�r�filename�lineno�msgr
r
rrBl�zIdbAdapter.set_breakcCrAr)r(�clear_breakrCr
r
rrHprGzIdbAdapter.clear_breakcCs|j�|�}|Sr)r(�clear_all_file_breaks�rrDrFr
r
rrIt�z IdbAdapter.clear_all_file_breakscCst|}t||�Sr)r�getattr)rr	�namerr
r
r�
frame_attrzs
zIdbAdapter.frame_attrcC�"t|}|j}t|�}|t|<|Sr)r�	f_globalsr�	dicttable�rr	r�dict�didr
r
r�
frame_globals~�
zIdbAdapter.frame_globalscCrOr)r�f_localsrrQrRr
r
r�frame_locals�rVzIdbAdapter.frame_localscCrOr)r�f_coder�	codetable)rr	r�code�cidr
r
r�
frame_code�rVzIdbAdapter.frame_codecC�t|}|jSr)rZ�co_name�rr\r[r
r
r�	code_name��zIdbAdapter.code_namecCr^r)rZ�co_filenamer`r
r
r�
code_filename�rbzIdbAdapter.code_filenamecCstd��)Nz"dict_keys not public or pickleable)�NotImplementedError�rrTr
r
r�	dict_keys�szIdbAdapter.dict_keyscCst|}t|���Sr)rQ�list�keys)rrTrSr
r
r�dict_keys_list�szIdbAdapter.dict_keys_listcCst|}||}t�|�}|Sr)rQ�reprlib�repr)rrT�keyrS�valuer
r
r�	dict_item�s
zIdbAdapter.dict_itemN)r$r%r&rr*r-r.r0r3r8r>rBrHrIrNrUrXr]rardrgrjror
r
r
rr'Fs*
	r'cCs,t||�}t�|�}t|�}|�t|�tS)a|Start the debugger and its RPC link in the Python subprocess

    Start the subprocess side of the split debugger and set up that side of the
    RPC link by instantiating the GUIProxy, Idb debugger, and IdbAdapter
    objects and linking them together.  Register the IdbAdapter with the
    RPCServer to handle RPC requests from the split debugger GUI via the
    IdbProxy.

    )rr�Idbr'�register�idb_adap_oid)�
rpchandlerr�	gui_proxyr(�idb_adapr
r
r�start_debugger�s



rvc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
FrameProxycCs||_||_d|_i|_dS)Nr)�_conn�_fid�_oid�
_dictcache)rrr	r
r
rr�s
zFrameProxy.__init__cCsb|dd�dkrt|��|dkr|��S|dkr|��S|dkr$|��S|j�|jd|j|fi�S)Nr�_rYrPrWrN)�AttributeError�_get_f_code�_get_f_globals�
_get_f_localsrxr!rzry�rrMr
r
r�__getattr__�s
�zFrameProxy.__getattr__cCs(|j�|jd|jfi�}t|j|j|�S)Nr])rxr!rzry�	CodeProxy)rr\r
r
rr~�szFrameProxy._get_f_codecC�"|j�|jd|jfi�}|�|�S)NrU�rxr!rzry�_get_dict_proxyrfr
r
rr���
zFrameProxy._get_f_globalscCr�)NrXr�rfr
r
rr��r�zFrameProxy._get_f_localscCs2||jvr
|j|St|j|j|�}||j|<|Sr)r{�	DictProxyrxrz)rrT�dpr
r
rr��s



zFrameProxy._get_dict_proxyN)	r$r%r&rr�r~rr�r�r
r
r
rrw�srwc@�eZdZdd�Zdd�ZdS)r�cC�||_||_||_dSr)rxrz�_cid)rrrr\r
r
rr��
zCodeProxy.__init__cCsD|dkr|j�|jd|jfi�S|dkr |j�|jd|jfi�SdS)Nr_rarcrd)rxr!rzr�r�r
r
rr��s���zCodeProxy.__getattr__N)r$r%r&rr�r
r
r
rr��sr�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
r�cCr�r)rxrz�_did)rrrrTr
r
rrr�zDictProxy.__init__cCs|j�|jd|jfi�S)Nrj�rxr!rzr�r+r
r
rris

�zDictProxy.keyscCs|j�|jd|j|fi�S)Nror�)rrmr
r
r�__getitem__s
�zDictProxy.__getitem__cCst|��r)r}r�r
r
rr�szDictProxy.__getattr__N)r$r%r&rrir�r�r
r
r
rr�s
	r�c@r�)�
GUIAdaptercCrr)r�gui)rrr�r
r
rrrzGUIAdapter.__init__cCs t|j|�}|j�|||�dSr)rwrr�r )rr"r	rrr
r
rr !szGUIAdapter.interactionNr#r
r
r
rr�sr�c@sleZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�IdbProxycCs||_||_||_dSr)rr�shell)rrr�rr
r
rr)r�zIdbProxy.__init__cOs|j�|j|||�}|Sr)rr!r)r�
methodname�args�kwargsrnr
r
r�call.sz
IdbProxy.callcCs$|j�|jd|fi�}||jj_dS)Nr>)r�
asyncqueuerr��interp�
active_seq)rr@�locals�seqr
r
rr>4szIdbProxy.runcs.��d|j|�\}}�fdd�|D�}||fS)Nr8cs g|]\}}t�j|�|f�qSr
)rwr)r4r	r6r+r
rr7<s z&IdbProxy.get_stack.<locals>.<listcomp>�r�ry)rrr9r;r<r
r+rr89szIdbProxy.get_stackcC�|�d�dS)Nr.�r�r+r
r
rr.?r,zIdbProxy.set_continuecCr�)Nr*r�r+r
r
rr*Br,zIdbProxy.set_stepcC�|�d|j�dS)Nr0r��rrr
r
rr0E�zIdbProxy.set_nextcCr�)Nr3r�r�r
r
rr3Hr�zIdbProxy.set_returncCr�)Nr-r�r+r
r
rr-Kr,zIdbProxy.set_quitcC�|�d||�}|S)NrBr�rCr
r
rrBNrGzIdbProxy.set_breakcCr�)NrHr�rCr
r
rrHRrGzIdbProxy.clear_breakcCs|�d|�}|S)NrIr�rJr
r
rrIVrKzIdbProxy.clear_all_file_breaksN)r$r%r&rr�r>r8r.r*r0r3r-rBrHrIr
r
r
rr�'sr�cCsD|�ddtfi�at||t�}t�||�}t||�}|�t|�|S)a]Start the subprocess debugger, initialize the debugger GUI and RPC link

    Request the RPCServer start the Python subprocess debugger and link.  Set
    up the Idle side of the split debugger by instantiating the IdbProxy,
    debugger GUI, and debugger GUIAdapter objects and linking them together.

    Register the GUIAdapter with the RPCClient to handle debugger GUI
    interaction requests coming from the subprocess debugger via the GUIProxy.

    The IdbAdapter will pass execution and environment requests coming from the
    Idle debugger GUI to the subprocess debugger via the IdbProxy.

    �exec�start_the_debugger)r!rrrr�r�Debuggerr�rq)�rpcclt�pyshell�	idb_proxyr��gui_adapr
r
r�start_remote_debuggerZs�
r�cCst|�|�t�dS)a]Shut down subprocess debugger and Idle side of debugger RPC link

    Request that the RPCServer shut down the subprocess debugger and link.
    Unregister the GUIAdapter, which will cause a GC on the Idle process
    debugger and RPC link objects.  (The second reference to the debugger GUI
    is deleted in pyshell.close_remote_debugger().)

    N)�close_subprocess_debugger�
unregisterr�r�r
r
r�close_remote_debuggerrs	r�cCs|�ddtfi�dS)Nr��stop_the_debugger)r!rrr�r
r
rr�~sr�cCs&|�ddtfi�}|tksJd��dS)Nr�r�z Idb restarted with different oid)r!rrr)r��idb_adap_oid_retr
r
r�restart_subprocess_debugger�s�r�r=)�mainz!idlelib.idle_test.test_debugger_rr
F)�	verbosity�exit)�__doc__rkr�idlelibr�	debuggingrrrrrQrZrrrrr'rvrwr�r�r�r�r�r�r�r�r$�unittestr�r
r
r
r�<module>s:
m*3�

Youez - 2016 - github.com/yon3zu
LinuXploit