KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/idlelib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/idlelib/RemoteDebugger.pyc
mς
‚=5Dc@sdZdkZdkZdkZdkZdZdadZhZhZ	hZ
hZd„Zd„Z
dfd„ƒYZd	fd
„ƒYZd„Zdfd
„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒ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.

Nitidb_adaptertgui_adaptercCst|ƒ}|t|<|S(N(tidtframetfidt
frametable(RR((t./usr/lib64/python2.4/idlelib/RemoteDebugger.pyt
wrap_frame*s
cCsn|djodSnV|d}t|tiƒpt‚t|ƒ}|t	|<|d|d|f}|SdS(s0replace info[2], a traceback instance, by its IDiiiN(tinfotNonet	tracebackt
isinstancettypest
TracebackTypetAssertionErrorRttraceback_idttracebacktablet
modified_info(RR
RR((Rt	wrap_info/s


tGUIProxycBstZd„Zdd„ZRS(NcCs||_||_dS(N(tconntselftgui_adap_oidtoid(RRR((Rt__init__=s	cCs5|ii|id|t|ƒt|ƒfhƒdS(Ntinteraction(	RRt
remotecallRtmessageRRRR(RRRR((RRAs(t__name__t
__module__RR	R(((RR;s	t
IdbAdaptercBs³tZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„Zd„Z
d
„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCs
||_dS(N(tidbR(RR((RRJscCs|iiƒdS(N(RRtset_step(R((RR OscCs|iiƒdS(N(RRtset_quit(R((RR!RscCs|iiƒdS(N(RRtset_continue(R((RR"UscCst|}|ii|ƒdS(N(RRRRRtset_next(RRR((RR#Xs
cCst|}|ii|ƒdS(N(RRRRRt
set_return(RRR((RR$\s
c	Csƒt|}|djo
d}nt|}|ii	||ƒ\}}g}|D]\}}|t|ƒ|fqQ~}||fS(N(RRRttbidR	ttbRRRt	get_stacktstacktit_[1]tkR(	RRR%R)R(R*R&RR+((RR'`s



3cCs#dk}|ii||iƒdS(N(t__main__RRtruntcmdt__dict__(RR.R,((RR-ms	cCs|ii||ƒ}|S(N(RRt	set_breaktfilenametlinenotmsg(RR1R2R3((RR0qscCs|ii||ƒ}|S(N(RRtclear_breakR1R2R3(RR1R2R3((RR4uscCs|ii|ƒ}|S(N(RRtclear_all_file_breaksR1R3(RR1R3((RR5yscCst|}t||ƒS(N(RRRtgetattrtname(RRR7R((Rt
frame_attrs
cCs-t|}|i}t|ƒ}|t|<|S(N(RRRt	f_globalstdictRtdidt	dicttable(RRR;R:R((Rt
frame_globalsƒs

	
cCs-t|}|i}t|ƒ}|t|<|S(N(RRRtf_localsR:RR;R<(RRR;R:R((Rtframe_localsŠs

	
cCs-t|}|i}t|ƒ}|t|<|S(N(RRRtf_codetcodeRtcidt	codetable(RRRARBR((Rt
frame_code‘s

	
cCst|}|iS(N(RCRBRAtco_name(RRBRA((Rt	code_namešs
cCst|}|iS(N(RCRBRAtco_filename(RRBRA((Rt
code_filenamežs
cCst|}|iƒS(N(R<R;R:tkeys(RR;R:((Rt	dict_keys€s
cCs$t|}||}t|ƒ}|S(N(R<R;R:tkeytvaluetrepr(RR;RKRLR:((Rt	dict_item¨s

(RRRR R!R"R#R$R'R-R0R4R5R8R=R?RDRFRHRJRN(((RRHs&							
												cCs>t||ƒ}ti|ƒ}t|ƒ}|i	t
|ƒt
S(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.

    N(Rt
rpchandlerRt	gui_proxytDebuggertIdbRRtidb_adaptregistertidb_adap_oid(RORRSRRP((Rtstart_debugger±s	t
FrameProxycBs>tZd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCs(||_||_d|_h|_dS(NR(RRt_connRt_fidt_oidt
_dictcache(RRR((RRΙs			cCs”|d djo
t|‚n|djo|iƒSn|djo|iƒSn|djo|iƒSn|ii|id|i	|fhƒS(Nit_R@R9R>R8(
R7tAttributeErrorRt_get_f_codet_get_f_globalst
_get_f_localsRXRRZRY(RR7((Rt__getattr__Οs



cCs:|ii|id|ifhƒ}t|i|i|ƒS(NRD(RRXRRZRYRBt	CodeProxy(RRB((RR^Ϋs$cCs1|ii|id|ifhƒ}|i|ƒS(NR=(RRXRRZRYR;t_get_dict_proxy(RR;((RR_ίscCs1|ii|id|ifhƒ}|i|ƒS(NR?(RRXRRZRYR;Rc(RR;((RR`δscCsK|ii|ƒo|i|Snt|i|i|ƒ}||i|<|S(N(RR[thas_keyR;t	DictProxyRXRZtdp(RR;Rf((RRcιs

(RRRRaR^R_R`Rc(((RRWΗs					RbcBstZd„Zd„ZRS(NcCs||_||_||_dS(N(RRRXRRZRBt_cid(RRRRB((RRσs		cCsj|djo&|ii|id|ifhƒSn|djo&|ii|id|ifhƒSndS(NRERFRGRH(R7RRXRRZRg(RR7((RRaψs

(RRRRa(((RRbρs	RecBs,tZd„Zd„Zd„Zd„ZRS(NcCs||_||_||_dS(N(RRRXRRZR;t_did(RRRR;((RRs		cCs"|ii|id|ifhƒS(NRJ(RRXRRZRh(R((RRIscCs%|ii|id|i|fhƒS(NRN(RRXRRZRhRK(RRK((Rt__getitem__scCs
t|‚dS(N(R]R7(RR7((RRas(RRRRIRiRa(((RRes			t
GUIAdaptercBstZd„Zd„ZRS(NcCs||_||_dS(N(RRtgui(RRRk((RRs	cCs,t|i|ƒ}|ii|||ƒdS(N(	RWRRRRRkRRR(RRRRR((RRs(RRRR(((RRjs	tIdbProxycBsttZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„Zd„Z
RS(
NcCs||_||_||_dS(N(RRRtshell(RRRmR((RR"s		cOs"|ii|i|||ƒ}|S(N(RRRRt
methodnametargstkwargsRL(RRnRoRpRL((Rtcall'scCs4|ii|id|fhƒ}||ii_dS(NR-(	RRt
asyncqueueRR.tseqRmtinterpt
active_seq(RR.tlocalsRs((RR--s!cCsa|id|i|ƒ\}}g}|D]%\}}|t
|i|ƒ|fq)~}||fS(NR'(RRqRRYR%R(R)R*RR+RWR(RRR%R)R(R*RR+((RR'2s9cCs|idƒdS(NR"(RRq(R((RR"8scCs|idƒdS(NR (RRq(R((RR ;scCs|id|iƒdS(NR#(RRqRRY(RR((RR#>scCs|id|iƒdS(NR$(RRqRRY(RR((RR$AscCs|idƒdS(NR!(RRq(R((RR!DscCs|id||ƒ}|S(NR0(RRqR1R2R3(RR1R2R3((RR0GscCs|id||ƒ}|S(NR4(RRqR1R2R3(RR1R2R3((RR4KscCs|id|ƒ}|S(NR5(RRqR1R3(RR1R3((RR5Os(RRRRqR-R'R"R R#R$R!R0R4R5(((RRl s											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_debuggerN(trpccltRRRURltpyshellt	idb_proxyRQRkRjtgui_adapRT(RyRzR|RkR{((Rtstart_remote_debuggerSs
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_debuggerRyt
unregisterR(Ry((Rtclose_remote_debuggerks
cCs|iddtfhƒdS(NRwtstop_the_debugger(RyRRU(Ry((RR~wscCs6|iddtfhƒ}|tjp
td‚dS(NRwRxs Idb restarted with different oid(RyRRtidb_adap_oid_retRUR(RyR‚((Rtrestart_subprocess_debuggerzs(t__doc__tsysRtrpcRQt	debuggingRURRR<RCRRRRRRVRWRbReRjRlR}R€R~Rƒ(RbR‡R<RRjR†RRlRRVRR}R…RWRRRR€RQReRRCR~Rƒ((Rt?s2						
i	*3			

Anon7 - 2021