b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / idlelib /
Filename/usr/lib64/python2.6/idlelib/RemoteDebugger.pyc
Size16.03 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed20-Jun-2019 19:45
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@s$dZddkZddklZddklZdZdadZhZhZ hZ
hZ d�Z d �Z
d
dd ��YZd dd
��YZd�Zddd��YZdd d��YZdd!d��YZdd"d��YZdd#d��YZd�Zd�Zd�Zd�ZdS($sÎ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.

iÿÿÿÿN(trpc(tDebuggerit idb_adaptert gui_adaptercCst|�}|t|<|S(N(tidt
frametable(tframetfid((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt
wrap_frame)s 
cCsk|djodS|d}t|ti�pt�t|�}|t|<|d|d|f}|SdS(s0replace info[2], a traceback instance, by its IDiiiN(tNonet
isinstancettypest
TracebackTypetAssertionErrorRttracebacktable(tinfot tracebackt traceback_idt
modified_info((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt wrap_info.s

 
tGUIProxycBseZd�Zdd�ZRS(cCs||_||_dS(N(tconntoid(tselfRt gui_adap_oid((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt__init__<s cCs5|ii|id|t|�t|�fh�dS(Nt interaction(Rt
remotecallRRR(RtmessageRR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR@sN(t__name__t
__module__RR R(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR:s t
IdbAdaptercBs³eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Z d
�Z d �Z
d �Zd
�Zd�Zd�Zd�Zd�Zd�ZRS(cCs
||_dS(N(tidb(RR ((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRIscCs|ii�dS(N(R tset_step(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR!NscCs|ii�dS(N(R tset_quit(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR"QscCs|ii�dS(N(R t set_continue(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR#TscCst|}|ii|�dS(N(RR tset_next(RRR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR$Ws
cCst|}|ii|�dS(N(RR t
set_return(RRR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR%[s
c Cs�t|}|djo
d}n t|}|ii||�\}}g}|D]\}}|t|�|fqQ~}||fS(N(RR RR t get_stackR( RRttbidRttbtstacktit_[1]tk((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR&_s



3cCs&ddk}|ii||i�dS(Niÿÿÿÿ(t__main__R trunt__dict__(RtcmdR-((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR.ls cCs|ii||�}|S(N(R t set_break(Rtfilenametlinenotmsg((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR1pscCs|ii||�}|S(N(R t clear_break(RR2R3R4((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR5tscCs|ii|�}|S(N(R tclear_all_file_breaks(RR2R4((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR6xscCst|}t||�S(N(Rtgetattr(RRtnameR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt
frame_attr~s
cCs-t|}|i}t|�}|t|<|S(N(Rt f_globalsRt dicttable(RRRtdicttdid((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt
frame_globals�s

  
cCs-t|}|i}t|�}|t|<|S(N(Rtf_localsRR;(RRRR<R=((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt frame_locals�s

  
cCs-t|}|i}t|�}|t|<|S(N(Rtf_codeRt codetable(RRRtcodetcid((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt
frame_code�s

  
cCst|}|iS(N(RBtco_name(RRDRC((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt code_name�s
cCst|}|iS(N(RBt co_filename(RRDRC((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt
code_filename�s
cCst|}|i�S(N(R;tkeys(RR=R<((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt dict_keys£s
cCs$t|}||}t|�}|S(N(R;trepr(RR=tkeyR<tvalue((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt dict_item§s

 (RRRR!R"R#R$R%R&R.R1R5R6R9R>R@RERGRIRKRO(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRGs&      
         cCs>t||�}ti|�}t|�}|it|�tS(s|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.

(RRtIdbRtregistert idb_adap_oid(t
rpchandlerRt gui_proxyR tidb_adap((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pytstart_debugger°s

 t
FrameProxycBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs(||_||_d|_h|_dS(NR(t_connt_fidt_oidt
_dictcache(RRR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRÈs   cCs�|d djo
t|�n|djo |i�S|djo |i�S|djo |i�S|ii|id|i|fh�S(Nit_RAR:R?R9(tAttributeErrort _get_f_codet_get_f_globalst
_get_f_localsRXRRZRY(RR8((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt __getattr__Îs

 
 
 cCs:|ii|id|ifh�}t|i|i|�S(NRE(RXRRZRYt CodeProxy(RRD((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR^Ús$cCs1|ii|id|ifh�}|i|�S(NR>(RXRRZRYt_get_dict_proxy(RR=((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR_ÞscCs1|ii|id|ifh�}|i|�S(NR@(RXRRZRYRc(RR=((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR`ãscCsH|ii|�o |i|St|i|i|�}||i|<|S(N(R[thas_keyt DictProxyRXRZ(RR=tdp((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRcès
 
(RRRRaR^R_R`Rc(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRWÆs     RbcBseZd�Zd�ZRS(cCs||_||_||_dS(N(RXRZt_cid(RRRRD((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRòs  cCsd|djo#|ii|id|ifh�S|djo#|ii|id|ifh�SdS(NRFRGRHRI(RXRRZRg(RR8((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRa÷s 

(RRRRa(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRbðs RecBs,eZd�Zd�Zd�Zd�ZRS(cCs||_||_||_dS(N(RXRZt_did(RRRR=((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRs  cCs"|ii|id|ifh�S(NRK(RXRRZRh(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRJscCs%|ii|id|i|fh�S(NRO(RXRRZRh(RRM((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt __getitem__
scCs
t|�dS(N(R](RR8((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRas(RRRRJRiRa(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRes   t
GUIAdaptercBseZd�Zd�ZRS(cCs||_||_dS(N(Rtgui(RRRk((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRs cCs,t|i|�}|ii|||�dS(N(RWRRkR(RRRRR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRs(RRRR(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRjs tIdbProxycBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Z d
�Z d �Z
RS( cCs||_||_||_dS(N(RRtshell(RRRmR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR!s  cOs"|ii|i|||�}|S(N(RRR(Rt
methodnametargstkwargsRN((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pytcall&scCs4|ii|id|fh�}||ii_dS(NR.(Rt
asyncqueueRRmtinterpt
active_seq(RR0tlocalstseq((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR.,s!cCsa|id|i|�\}}g}|D]%\}}|t|i|�|fq)~}||fS(NR&(RqRYRWR(RRR'R)R*R+RR,((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR&1s9cCs|id�dS(NR#(Rq(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR#7scCs|id�dS(NR!(Rq(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR!:scCs|id|i�dS(NR$(RqRY(RR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR$=scCs|id|i�dS(NR%(RqRY(RR((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR%@scCs|id�dS(NR"(Rq(R((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR"CscCs|id||�}|S(NR1(Rq(RR2R3R4((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR1FscCs|id||�}|S(NR5(Rq(RR2R3R4((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR5JscCs|id|�}|S(NR6(Rq(RR2R4((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR6Ns(RRRRqR.R&R#R!R$R%R"R1R5R6(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyRls           cCsb|iddtfh�at||t�}ti||�}t||�}|it|�|S(s]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.

texectstart_the_debugger(RRRRRlRRjRQ(trpcclttpyshellt idb_proxyRktgui_adap((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pytstart_remote_debuggerRs cCst|�|it�dS(s]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(tclose_subprocess_debuggert
unregisterR(Ry((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pytclose_remote_debuggerjs
cCs|iddtfh�dS(NRwtstop_the_debugger(RRR(Ry((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyR~vscCs6|iddtfh�}|tjp
td�dS(NRwRxs Idb restarted with different oid(RRRRR
(Rytidb_adap_oid_ret((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pytrestart_subprocess_debuggerys ((((((((t__doc__R tidlelibRRt debuggingRRRRR;RBRRRRRRVRWRbReRjRlR}R�R~R�(((s./usr/lib64/python2.6/idlelib/RemoteDebugger.pyt<module>s0   
i * 3