JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў f.c@s9dZddlZddlmZddlmZdZdadZiZiZ iZ iZ ddZ d d Z Gd d d ZGd ddZddZGdddZGdddZGdddZGdddZGdddZddZddZdd Zd!d"ZdS(#uSupport 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. iN(urpc(uDebuggeru idb_adapteru gui_adaptercCst|}|t|<|S(N(uidu frametable(uframeufid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu wrap_frame)s  u wrap_framecCsO|dkrdS|d}t|}|t|<|d|d|f}|SdS(u0replace info[2], a traceback instance, by its IDiiiN(uNoneuidutracebacktable(uinfou tracebacku traceback_idu modified_info((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu wrap_info.s    u wrap_infocBs/|EeZdZddZdddZdS(uGUIProxycCs||_||_dS(N(uconnuoid(uselfuconnu gui_adap_oid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__<s uGUIProxy.__init__cCs5|jj|jd|t|t|fidS(Nu interaction(uconnu remotecalluoidu wrap_frameu wrap_info(uselfumessageuframeuinfo((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu interaction@suGUIProxy.interactionN(u__name__u __module__u __qualname__u__init__uNoneu interaction(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuGUIProxy:s uGUIProxycBs|EeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)S(*u IdbAdaptercCs ||_dS(N(uidb(uselfuidb((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__IsuIdbAdapter.__init__cCs|jjdS(N(uidbuset_step(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_stepNsuIdbAdapter.set_stepcCs|jjdS(N(uidbuset_quit(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_quitQsuIdbAdapter.set_quitcCs|jjdS(N(uidbu set_continue(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_continueTsuIdbAdapter.set_continuecCst|}|jj|dS(N(u frametableuidbuset_next(uselfufiduframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_nextWs uIdbAdapter.set_nextcCst|}|jj|dS(N(u frametableuidbu set_return(uselfufiduframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_return[s uIdbAdapter.set_returncCsat|}|dkrd}n t|}|jj||\}}dd|D}||fS(NcSs(g|]\}}t||fqS((u wrap_frame(u.0uframeuk((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu fs u(IdbAdapter.get_stack..(u frametableuNoneutracebacktableuidbu get_stack(uselfufidutbiduframeutbustackui((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu get_stack_s    uIdbAdapter.get_stackcCs&ddl}|jj||jdS(Ni(u__main__uidburunu__dict__(uselfucmdu__main__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyurunis uIdbAdapter.runcCs|jj||}|S(N(uidbu set_break(uselfufilenameulinenoumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_breakmsuIdbAdapter.set_breakcCs|jj||}|S(N(uidbu clear_break(uselfufilenameulinenoumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu clear_breakqsuIdbAdapter.clear_breakcCs|jj|}|S(N(uidbuclear_all_file_breaks(uselfufilenameumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuclear_all_file_breaksusu IdbAdapter.clear_all_file_breakscCst|}t||S(N(u frametableugetattr(uselfufidunameuframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu frame_attr{s uIdbAdapter.frame_attrcCs-t|}|j}t|}|t|<|S(N(u frametableu f_globalsuidu dicttable(uselfufiduframeudictudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu frame_globalss     uIdbAdapter.frame_globalscCs-t|}|j}t|}|t|<|S(N(u frametableuf_localsuidu dicttable(uselfufiduframeudictudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu frame_localss     uIdbAdapter.frame_localscCs-t|}|j}t|}|t|<|S(N(u frametableuf_codeuidu codetable(uselfufiduframeucodeucid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu frame_codes     uIdbAdapter.frame_codecCst|}|jS(N(u codetableuco_name(uselfuciducode((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu code_names uIdbAdapter.code_namecCst|}|jS(N(u codetableu co_filename(uselfuciducode((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu code_filenames uIdbAdapter.code_filenamecCstddS(Nu"dict_keys not public or pickleable(uNotImplemented(uselfudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu dict_keyssuIdbAdapter.dict_keyscCst|}t|jS(N(u dicttableulistukeys(uselfudidudict((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyudict_keys_lists uIdbAdapter.dict_keys_listcCs$t|}||}t|}|S(N(u dicttableurepr(uselfudidukeyudictuvalue((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu dict_items   uIdbAdapter.dict_itemN(u__name__u __module__u __qualname__u__init__uset_stepuset_quitu set_continueuset_nextu set_returnu get_stackurunu set_breaku clear_breakuclear_all_file_breaksu frame_attru frame_globalsu frame_localsu frame_codeu code_nameu code_filenameu dict_keysudict_keys_listu dict_item(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu IdbAdapterGs(                 u IdbAdaptercCs>t||}tj|}t|}|jt|tS(u|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. (uGUIProxyuDebuggeruIdbu IdbAdapteruregisteru idb_adap_oid(u rpchandleru gui_adap_oidu gui_proxyuidbuidb_adap((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyustart_debuggers  ustart_debuggercBs\|EeZdZddZddZddZddZd d Zd d Zd S(u FrameProxycCs(||_||_d|_i|_dS(Nu idb_adapter(u_connu_fidu_oidu _dictcache(uselfuconnufid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__s   uFrameProxy.__init__cCs|dddkr%t|n|dkr;|jS|dkrQ|jS|dkrg|jS|jj|jd|j|fiS(Niu_uf_codeu f_globalsuf_localsu frame_attr(uAttributeErroru _get_f_codeu_get_f_globalsu _get_f_localsu_connu remotecallu_oidu_fid(uselfuname((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu __getattr__s      uFrameProxy.__getattr__cCs:|jj|jd|jfi}t|j|j|S(Nu frame_code(u_connu remotecallu_oidu_fidu CodeProxy(uselfucid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu _get_f_codes$uFrameProxy._get_f_codecCs1|jj|jd|jfi}|j|S(Nu frame_globals(u_connu remotecallu_oidu_fidu_get_dict_proxy(uselfudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu_get_f_globalssuFrameProxy._get_f_globalscCs1|jj|jd|jfi}|j|S(Nu frame_locals(u_connu remotecallu_oidu_fidu_get_dict_proxy(uselfudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu _get_f_localssuFrameProxy._get_f_localscCsC||jkr|j|St|j|j|}||j|<|S(N(u _dictcacheu DictProxyu_connu_oid(uselfudidudp((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu_get_dict_proxys   uFrameProxy._get_dict_proxyN( u__name__u __module__u __qualname__u__init__u __getattr__u _get_f_codeu_get_f_globalsu _get_f_localsu_get_dict_proxy(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu FrameProxys     u FrameProxycBs,|EeZdZddZddZdS(u CodeProxycCs||_||_||_dS(N(u_connu_oidu_cid(uselfuconnuoiducid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__s  uCodeProxy.__init__cCs`|dkr.|jj|jd|jfiS|dkr\|jj|jd|jfiSdS(Nuco_nameu code_nameu co_filenameu code_filename(u_connu remotecallu_oidu_cid(uselfuname((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu __getattr__s   uCodeProxy.__getattr__N(u__name__u __module__u __qualname__u__init__u __getattr__(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu CodeProxys u CodeProxycBsD|EeZdZddZddZddZddZd S( u DictProxycCs||_||_||_dS(N(u_connu_oidu_did(uselfuconnuoidudid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__s  uDictProxy.__init__cCs"|jj|jd|jfiS(Nudict_keys_list(u_connu remotecallu_oidu_did(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyukeyssuDictProxy.keyscCs%|jj|jd|j|fiS(Nu dict_item(u_connu remotecallu_oidu_did(uselfukey((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu __getitem__suDictProxy.__getitem__cCst|dS(N(uAttributeError(uselfuname((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu __getattr__suDictProxy.__getattr__N(u__name__u __module__u __qualname__u__init__ukeysu __getitem__u __getattr__(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu DictProxys  u DictProxycBs,|EeZdZddZddZdS(u GUIAdaptercCs||_||_dS(N(uconnugui(uselfuconnugui((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__s uGUIAdapter.__init__cCs,t|j|}|jj|||dS(N(u FrameProxyuconnuguiu interaction(uselfumessageufidu modified_infouframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu interaction"suGUIAdapter.interactionN(u__name__u __module__u __qualname__u__init__u interaction(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu GUIAdapters u GUIAdaptercBs|EeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZdS(uIdbProxycCs||_||_||_dS(N(uoiduconnushell(uselfuconnushelluoid((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu__init__*s  uIdbProxy.__init__cOs"|jj|j|||}|S(N(uconnu remotecalluoid(uselfu methodnameuargsukwargsuvalue((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyucall/su IdbProxy.callcCs4|jj|jd|fi}||jj_dS(Nurun(uconnu asyncqueueuoidushelluinterpu active_seq(uselfucmdulocalsuseq((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyurun5s!u IdbProxy.runcsAjd|j|\}}fdd|D}||fS(Nu get_stackcs.g|]$\}}tj||fqS((u FrameProxyuconn(u.0ufiduk(uself(u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu =s u&IdbProxy.get_stack..(ucallu_fid(uselfuframeutbidustackui((uselfu;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu get_stack:suIdbProxy.get_stackcCs|jddS(Nu set_continue(ucall(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_continue@suIdbProxy.set_continuecCs|jddS(Nuset_step(ucall(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_stepCsuIdbProxy.set_stepcCs|jd|jdS(Nuset_next(ucallu_fid(uselfuframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_nextFsuIdbProxy.set_nextcCs|jd|jdS(Nu set_return(ucallu_fid(uselfuframe((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_returnIsuIdbProxy.set_returncCs|jddS(Nuset_quit(ucall(uself((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuset_quitLsuIdbProxy.set_quitcCs|jd||}|S(Nu set_break(ucall(uselfufilenameulinenoumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu set_breakOsuIdbProxy.set_breakcCs|jd||}|S(Nu clear_break(ucall(uselfufilenameulinenoumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyu clear_breakSsuIdbProxy.clear_breakcCs|jd|}|S(Nuclear_all_file_breaks(ucall(uselfufilenameumsg((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuclear_all_file_breaksWsuIdbProxy.clear_all_file_breaksN(u__name__u __module__u __qualname__u__init__ucallurunu get_stacku set_continueuset_stepuset_nextu set_returnuset_quitu set_breaku clear_breakuclear_all_file_breaks(u __locals__((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuIdbProxy(s           uIdbProxycCsb|jddtfiat||t}tj||}t||}|jt||S(u]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. uexecustart_the_debugger(u remotecallu gui_adap_oidu idb_adap_oiduIdbProxyuDebuggeru GUIAdapteruregister(urpccltupyshellu idb_proxyuguiugui_adap((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyustart_remote_debugger[s ustart_remote_debuggercCst||jtdS(u]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(uclose_subprocess_debuggeru unregisteru gui_adap_oid(urpcclt((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuclose_remote_debuggerss uclose_remote_debuggercCs|jddtfidS(Nuexecustop_the_debugger(u remotecallu idb_adap_oid(urpcclt((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyuclose_subprocess_debuggersuclose_subprocess_debuggercCs|jddtfi}dS(Nuexecustart_the_debugger(u remotecallu gui_adap_oid(urpccltuidb_adap_oid_ret((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyurestart_subprocess_debuggers urestart_subprocess_debugger(u__doc__utypesuidleliburpcuDebuggeru debuggingu idb_adap_oidu gui_adap_oidu frametableu dicttableu codetableutracebacktableu wrap_frameu wrap_infouGUIProxyu IdbAdapterustart_debuggeru FrameProxyu CodeProxyu DictProxyu GUIAdapteruIdbProxyustart_remote_debuggeruclose_remote_debuggeruclose_subprocess_debuggerurestart_subprocess_debugger(((u;/opt/alt/python33/lib64/python3.3/idlelib/RemoteDebugger.pyus0    m * 3