a DOg@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZGdddeZgdZddZddZd d ZGd d d eZd ZGdddejejZedurgdZeD] Zeeedejd7Zqeej j7Z[[d+ddZ!d,ddZ"ddZ#ddZ$ddddZ%d-ddZ&d d!Z'd"Z(d#d$Z)d%d&Z*d'Z+d(d)Z,e-d*krddl.Z.e.,dS).Nc@s eZdZdS)RestartN)__name__ __module__ __qualname__rr/usr/lib64/python3.9/pdb.pyrWsr) runpmPdbrunevalrunctxruncall set_trace post_mortemhelpcCstdt|}zt|}Wnty6YdS0|Lt|ddD].\}}||rJ|||fWdSqJWdn1s0YdS)Nzdef\s+%s\s*[(])start)recompileescapetokenizeopenOSError enumeratematch)funcnamefilenameZcrefplinenolinerrr find_function^s  <r cCsXt|\}}t|r,|j|jur,|dfSt|r>|dfSt||d|dfSNr)inspectZ findsourceZisframe f_globalsf_localsZismoduleZgetblock)objlinesrrrrgetsourcelinesks  r'cCs8tt|}||D]\}}||kr|SqdSNr)listdisZfindlinestartsreverse)codeZlastiZ linestartsirrrr lasti2linenots   r.c@seZdZddZdS)_rstrcCs|SNrselfrrr__repr__sz_rstr.__repr__N)rrrr3rrrrr/}sr/z -> c@s$eZdZdZdddZddZd d Zd d Zd dZddZ ddZ ddZ ddZ ddZ ddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6ZeZdd8d9Zd:d;ZeZ eZ!eZ"dd?Z%d@dAZ&dBdCZ'eZ(dDdEZ)eZ*dFdGZ+eZ,dHdIZ-eZ.dJdKZ/e/Z0eZ1eZ2dLdMZ3e3Z4e3Z5dNdOZ6dPdQZ7e7Z8dRdSZ9e9Z:dTdUZ;e;ZdXdYZ?e?Z@dZd[ZAeAZBd\d]ZCeCZDd^d_ZEeEZFZGd`daZHeHZIdbdcZJeZKdddeZLeLZMeLZNdfdgZOdhdiZPePZQdjdkZReRZSdldmZTddndoZUdpdqZVdrdsZWdtduZXdvdwZYeZZeZ[eZ\dxdyZ]e]Z^dzd{Z_e_Z`d|d}ZaeZbdddZcddZdeZeddZfeZgddZhddZiddZjddZkddZlddZmgdZnddZoepfddZqddZrerZsddZtddZuddZvddZwddZxdS)r NtabFTc Csbtjj||dtj||||td|r6d|_d|_i|_ i|_ d|_ d|_ i|_ zddl}|dWntyYn0d|_||_g|_|r@z@ttjd}|j|Wdn1s0YWntyYn0z:td }|j|Wdn1s0YWnty>Yn0i|_i|_i|_d|_d|_dS) N)skipzpdb.Pdbrz(Pdb) Fz `@#$%^&*()=+[{]}\|;:'",<>?z~/.pdbrcz.pdbrc)bdbBdb__init__cmdCmdsysauditZ use_rawinputpromptaliases displaying mainpyfile_wait_for_mainpyfile tb_linenoreadlineZset_completer_delims ImportError allow_kbdintnosigintrcLinesrospath expanduserextendrcommandscommands_dopromptcommands_silentcommands_defining commands_bnum) r2 completekeystdinstdoutr5rGZreadrcrDZrcFilerrrr9sF  .  0z Pdb.__init__cCs*|jr t|d|||dS)Nz- Program interrupted. (Use 'cont' to resume).)rFKeyboardInterruptmessageset_stepr)r2signumframerrrsigint_handlers  zPdb.sigint_handlercCstj||dSr0)r7r8resetforgetr1rrrr[s z Pdb.resetcCs&d|_g|_d|_d|_|jdSr()rstackcurindexcurframerCclearr1rrrr\s z Pdb.forgetcCsh||||\|_|_|rDt|jj|j}||j|j<|j }q|j|jd|_ |j j |_ | Sr()r\Z get_stackr]r^r.tb_framef_codetb_lastirCtb_nextr_r$curframe_locals execRcLines)r2ftbrrrrsetups  z Pdb.setupcCsd|js dS|j}|g|_|r`|}|r|ddkr||r|jt|7_dSqdS)Nr#T)rHr+popstriponecmdreversed)r2rHrrrrrfs  zPdb.execRcLinescCs.|jr dS||r*|d||ddS)Nz--Call--)rBZ stop_hererV interaction)r2rYZ argument_listrrr user_calls   z Pdb.user_callcCsH|jr.|j||jjks$|jdkr(dSd|_||rD||ddS)NrF)rBrAcanonicrb co_filenamef_lineno bp_commandsro)r2rYrrr user_lines z Pdb.user_linecCst|ddr|j|jvr|j}d|_|j}||d|j|D]}||q@||_|j|sr||j|j |j |r| | dSdS)N currentbpFrr) getattrrvrMlastcmdrirmrOprint_stack_entryr]r^rN_cmdloopr\)r2rYrvZ lastcmd_backrrrrrts"      zPdb.bp_commandscCs.|jr dS||jd<|d||ddS)N __return__z --Return--)rBr$rVro)r2rYZ return_valuerrr user_return s   zPdb.user_returncCsh|jr dS|\}}}||f|jd<|s2|tur2dnd}|d|t||df|||dS)NZ __exception__z Internal r6z%s%s)rBr$ StopIterationrV tracebackformat_exception_onlyrlro)r2rYexc_infoexc_type exc_value exc_tracebackprefixrrruser_exception(s zPdb.user_exceptioncCs@zd|_|d|_Wq\}}||}||ur||kr|||<|d|||fqdS)Nzdisplay %s: %r [old: %r])r@getr_items_getval_exceptrV)r2r@exprZoldvalueZnewvaluerrrpreloopIs z Pdb.preloopcCsrtjr4zttjtjWnty,Yn0dt_|||rL|dS||j|j | |dSr0) r _previous_sigint_handlersignalSIGINT ValueErrorrir\ryr]r^rz)r2rYrrrrroVs  zPdb.interactioncCs|dur|t|dSr0)rVrepr)r2r%rrr displayhookhszPdb.displayhookcCs|dddkr|dd}|j}|jj}zvt|ddd}tj}tj}tj}z:|jt_|jt_|jt_t|||W|t_|t_|t_n|t_|t_|t_0Wn| Yn0dS)Nr! zZsingle) rer_r#rr<rTrSrexec _error_exc)r2rlocalsglobalsr,Z save_stdoutZ save_stdinZsave_displayhookrrrdefaultps* z Pdb.defaultcCs|s |S|}|d|jvr|j|d}d}|ddD] }|dt||}|d7}q@|dd|dd}|}q|ddkr|d}|dkr||dd}|j ||d| }|S) Nrr%z%* aliasz;;) rlsplitr?replacestrjoinfindlstripcmdqueueappendrstrip)r2rargsiiZtmpArgZmarkernextrrrprecmds(     z Pdb.precmdcCs"|jstj||S||SdSr0)rPr:r;rmhandle_command_def)r2rrrrrmsz Pdb.onecmdcCs||\}}}|sdS|dkr0d|j|j<dS|dkrBg|_dS|j|j}|rf||d|n ||zt|d|}Wnty|j}Yn0|j |j vrd|j |j<g|_dSdS)NZsilentTendrrdo_F) Z parselinerOrQrrMrrwAttributeErrorrrcommands_resumingrN)r2rr:argZcmdlistfuncrrrrs,       zPdb.handle_command_defcCst||jddS)NfileprintrTr2msgrrrrVsz Pdb.messagecCstd||jddS)Nz***rrrrrrerrorsz Pdb.errorcCs|drgSz|||||}Wnty<g}Yn0tt|d}|D]H}tj|rv| |dqVtj |rV| drV| |dqV|S)N):,*/).pyz.pywr) rlendswith_complete_expression ExceptionglobrrIrJisdirrisfilelower)r2textrbegidxendidxretglobsfnrrr_complete_locations   zPdb._complete_locationcsfddttjjDS)Ncs.g|]&\}}|durt|rt|qSr0)r startswith).0r-bprrr s z*Pdb._complete_bpnumber..)rr7 Breakpoint bpbynumberr2rrrrrrr_complete_bpnumberszPdb._complete_bpnumberc s|js gSi|jj|j}dvrdz,|d}ddD]}t||}qHWnttfytgYS0ddddfddt|DSfdd| DSdS)N.rrr}cs"g|]}|dr|qS)r}rrn)dottedrrrrz,Pdb._complete_expression..csg|]}|r|qSrrrrrrrr) r_r#rerrwKeyErrorrrdirkeys)r2rrrrnsr%partr)rrrrrs   zPdb._complete_expressioncCs6|sttjjd}n&z t|}Wn|dYdS0||_||jvrj|j||j||j |f}nd}g|j|<d|j|<d|j |<|j }d|_ d|_ zz | Wnft y|r|d|j|<|d|j|<|d|j |<n|j|=|j|=|j |=|dYn0Wd|_ ||_ nd|_ ||_ 0dS) Nrz.Usage: commands [bnum] ... endTFz(com) rrz1command definition aborted, old commands restored)lenr7rrintrrQrMrNrOr>rPrrU)r2rZbnumZold_command_defsZ prompt_backrrr do_commandssF%       zPdb.do_commandsrc Cs>|s8|jr4|dtjjD]}|r||qdSd}d}d}|d}|dkrz||dd}|d|}| d}d} |dkr|d|}| |} | s| d|dS| }||dd}z t |}Wn$t y | d|YdS0nz t |}Wnt yzt||jj|j} Wn|} Yn0z.t| drf| j} | j} | j} | j}| j}WnD||\} }}| s| d |YYdS| } t |}Yn0Yn0|s|}|||}|r:|||||| }|r| |n*|||d }|d |j|j|jfdS) Nz!Num Type Disp Enb Whererrrrz%r not found from sys.pathzBad lineno: %s__func__zJThe specified object %r is not a function or was not found along sys.path.r}zBreakpoint %d at %s:%d) breaksrVr7rrZbpformatrrrrfind lookupmodulerrrevalr_r#rehasattrr__code__co_nameco_firstlinenorrlineinfo defaultFile checklineZ set_break get_breaksnumberrr)r2rZ temporaryrrrcondZcommacolonrrgrr,okZlnrerrrrrdo_breakWs              z Pdb.do_breakcCs"|jjj}|dkr|jr|j}|S)Nz)r_rbrrrA)r2rrrrrs zPdb.defaultFilecCs||ddSr!)rr2rrrr do_tbreaksz Pdb.do_tbreakc Csd}|d}t|dkr(|d}nt|dkrB|d}n|S|dkrR|S|d}|ddkr~|d=t|dkr~|S|}t|dkr|d}n||d}|r|}|d}t||} | p|S) N)NNN'rrr6rr2)rrrlrrr ) r2Z identifierZfailedZidstringidpartsfnameitemrgZanswerrrrrs,          z Pdb.lineinfocCst|dd}|r|jnd}t|||}|s:|ddS|}|rr|ddksr|dddksr|dddkr|ddS|S) Nr_z End of filerrjrz"""z'''zBlank or comment)rwr# linecachegetlinerVrlr)r2rrrYrrrrrrs   z Pdb.checklinec Csj|}|D]X}z||}Wn.tyL}z||WYd}~q d}~00||d|q dS)Nz Enabled %s)rget_bpbynumberrrenablerVr2rrr-rrrrr do_enables z Pdb.do_enablec Csj|}|D]X}z||}Wn.tyL}z||WYd}~q d}~00||d|q dS)Nz Disabled %s)rrrrdisablerVrrrr do_disables zPdb.do_disablec Cs|dd}z |d}Wnty.d}Yn0z||d}WnHtyb|dYnZty}z||WYd}~n6d}~00||_|s|d|jn|d|jdS)NrrrBreakpoint number expectedz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.) r IndexErrorrrlrrrrVr)r2rrrrrrrr do_condition%s      zPdb.do_conditionc Cs|}zt|d}Wnd}Yn0z||d}WnHty`|dYnxty}z||WYd}~nTd}~00||_|dkr|dkrd|}nd}|d||j fn|d|j dS)Nrrrz %d crossingsz 1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.) rrrlrrrrignorerVr)r2rrcountrrZcountstrrrr do_ignore@s,     z Pdb.do_ignorec Cs|srz td}Wnty&d}Yn0|}|dvrnddtjjD}||D]}|d|qZdSd|vr| d}|d|}||dd}z t |}Wnt yd |}Yn"0| ||dd}| ||}|r||n|D]}|d|qdS|} | D]^}z||}Wn0t yd}z||WYd}~n"d}~00|||d|q"dS) NzClear all breaks? no)yZyescSsg|] }|r|qSrr)rrrrrrqrz Pdb.do_clear..z Deleted %srrzInvalid line number (%s))inputEOFErrorrlrr7rrZclear_all_breaksrVrrrrZ clear_breakrrrZclear_bpbynumber) r2rZreplyZbplistrr-rrrZ numberlistrrrdo_clearcsF             z Pdb.do_clearcCs |dSr0)print_stack_tracerrrrdo_wheresz Pdb.do_wherecCs>||_|j|jd|_|jj|_||j|jd|_dSr()r^r]r_r$reryr)r2rrrr _select_frames  zPdb._select_framecCsx|jdkr|ddSzt|p"d}Wn"tyJ|d|YdS0|dkrZd}ntd|j|}||dS)Nrz Oldest framerInvalid frame count (%s))r^rrrmaxrr2rr Znewframerrrdo_ups   z Pdb.do_upcCs|jdt|jkr"|ddSzt|p,d}Wn"tyT|d|YdS0|dkrnt|jd}ntt|jd|j|}||dS)Nrz Newest framerr)r^rr]rrrminrrrrrdo_downs  z Pdb.do_downcCsf|rPz t|}Wn"ty2|d|YdS0||jjkrT|ddSnd}||j|dS)NError in argument: %rz7"until" line number is smaller than current line numberr)rrrr_rsZ set_until)r2rrrrrdo_untils    z Pdb.do_untilcCs |dSr!)rWrrrrdo_stepsz Pdb.do_stepcCs||jdSr!)Zset_nextr_rrrrdo_nexts z Pdb.do_nextc Csz|rrddl}tjdd}z||t_Wn8tyb}z |d||fWYd}~dSd}~00|tjdd<tdS)NrrzCannot run %s: %s)shlexr<argvrrrr)r2rrZargv0errrdo_runsz Pdb.do_runcCs||jdSr!)Z set_returnr_rrrr do_returns z Pdb.do_returncCs<|js0zttj|jt_Wnty.Yn0|dSr!)rGrrrZr rrZ set_continuerrrr do_continues zPdb.do_continuec Cs|jdt|jkr"|ddSz t|}WntyJ|dYnp0z:||j_|j|jd|f|j|j<||j|jWn2ty}z|d|WYd}~n d}~00dS)Nrz)You can only jump within the bottom framez)The 'jump' command requires a line numberrzJump failed: %s) r^rr]rrrr_rsry)r2rr rrrdo_jump*s    z Pdb.do_jumpcCstd|jj}|j}t|j|j|j}d|j |_ | dzt |j |||fWntyv|Yn0| dt|j|j|_dS)Nz(%s) zENTERING RECURSIVE DEBUGGERzLEAVING RECURSIVE DEBUGGER)r<settracer_r#rer rRrSrTr>rlrV call_tracingrrrZtrace_dispatchrx)r2rrrprrrdo_debugGs     z Pdb.do_debugcCsd|_|dS)NTr)_user_requested_quitset_quitrrrrdo_quit]sz Pdb.do_quitcCs|dd|_|dS)Nr6Tr)rVr)r*rrrrdo_EOFhs z Pdb.do_EOFcCs|jj}|j}|j|j}|jtj@r.|d}|jtj@rB|d}t |D]>}|j |}||vrx| d|||fqJ| d|fqJdS)Nrz%s = %rz%s = *** undefined ***) r_rbre co_argcountco_kwonlyargcountco_flagsr"Z CO_VARARGSZCO_VARKEYWORDSrange co_varnamesrV)r2rcodictrr-namerrrdo_argsqs   z Pdb.do_argscCs.d|jvr |t|jdn |ddS)Nr{zNot yet returned!)rerVrrrrrr do_retvals z Pdb.do_retvalcCs0zt||jj|jWS|Yn0dSr0)rr_r#rerrrrr_getvals z Pdb._getvalcCsrz2|durt||jj|jWSt||j|jWSWn:tdd}tj|d }t d|YS0dS)Nrr}z** raised %s **) rr_r#rer$r<rrrrlr/)r2rrYrrrrrrszPdb._getval_exceptcCs,tdd}|tj|ddS)Nrr})r<rrrrrl)r2rrrrrszPdb._error_exccCsJz||}WnYdS0z|||Wn|Yn0dSr0)r7rVr)r2rrvalrrr _msg_val_funcszPdb._msg_val_funccCs||tdSr0)r9rrrrrdo_pszPdb.do_pcCs||tjdSr0)r9pprintZpformatrrrrdo_ppsz Pdb.do_ppcCsbd|_d}|r|dkrz^d|vrX|d\}}t|}t|}||krr||}nt|}td|d}Wqty|d|YdS0n0|jdus|dkrtd|jj d}n |jd}|dur|d}|jj j }| |}zZt ||jj}|||d||||jt|t||_t||krF|dWnty\Yn0dS) Nr)rrrr z[EOF])rxrrrlrrrrr_rsrbrrget_file_breaksrgetlinesr# _print_linesrrrVrU)r2rlastfirstr breaklistr&rrrdo_lists@          z Pdb.do_listc Csn|jjj}||}zt|j\}}Wn0tyV}z||WYd}~dSd}~00|||||jdSr0)r_rbrrr?r'rrrA)r2rrrDr&rrrrr do_longlists   zPdb.do_longlistc Cstz||}WnYdS0zt|\}}Wn4ttfyb}z||WYd}~dSd}~00|||dSr0)r7r'r TypeErrorrrA)r2rr%r&rrrrr do_sources z Pdb.do_sourcerc Cs|r|j}|j|d}nd}}t||D]|\}}t|d} t| dkrV| d7} ||vrh| d7} n| d7} ||kr| d7} n||kr| d7} || d|q,dS) Nr}rrBz->z>> ) rsrCrrrrjustrrVr) r2r&rrrYZcurrent_linenoZ exc_linenorrsrrrrAs    zPdb._print_linescCsz||}WnYdS0d}z |jj}Wnty@Yn0|rZ|d|jdSz |j}WntyvYn0|r|d|jdS|jtur|d|j|j fdS|t|dS)Nz Method %sz Function %sz Class %s.%s) r7rrrrVr __class__typerr)r2rvaluer,rrr do_whatis#s.     z Pdb.do_whatiscCsl|s8|d|j|jiD]}|d|q"n0||}||j|ji|<|d||fdS)NzCurrently displaying:z%s: %rzdisplay %s: %r)rVr@rr_rr setdefault)r2rrr8rrr do_displayFs  zPdb.do_displaycCsR|r>z|j|ji|=WqNty:|d|YqN0n|j|jddS)Nznot displaying %s)r@rr_rrrkrrrr do_undisplayYs  zPdb.do_undisplaycsfdd|j|jiDS)Ncsg|]}|r|qSrr)rr rrrris z*Pdb.complete_undisplay..)r@rr_rrrrcomplete_undisplayhszPdb.complete_undisplaycCs$i|jj|j}tjd|ddS)Nz *interactive*)local)r_r#rer,interact)r2rrrrr do_interactlszPdb.do_interactcCs|}t|dkrHt|j}|D]}|d||j|fq&dS|d|jvrt|dkr|d|d|j|dfnd|dd|j|d<dS)Nrz%s = %srr)rrsortedr?rrVr)r2rrrrrrrdo_aliasus "z Pdb.do_aliascCs6|}t|dkrdS|d|jvr2|j|d=dSr()rrr?)r2rrrrr do_unaliasszPdb.do_unaliascsfdd|jDS)Ncsg|]}|r|qSrr)rarrrrrz(Pdb.complete_unalias..)r?rrrrcomplete_unaliasszPdb.complete_unalias)r#rrr"r+r$cCs2z|jD]}||qWnty,Yn0dSr0)r]ryrU)r2 frame_linenorrrrs   zPdb.print_stack_tracecCs6|\}}||jurd}nd}|||||dS)Nz> z )r_rVZformat_stack_entry)r2r^Z prompt_prefixrYrrrrrrys  zPdb.print_stack_entrycCs|stj||Sz>zt|d|}|WWStyLt|d|}Yn0Wn typ|d|YnL0tjjdkr|d|dS|j dur|d|dS| |j dS)NZhelp_rzNo help for %rrzJNo help for %r; please do not run Python with -OO if you need command helpz&No help for %r; __doc__ string missing) r:r;do_helprwrrr<flagsoptimize__doc__rVr)r2rZtopicZcommandrrrr_s&     z Pdb.do_helpcCs||jjpddS)Nr6)rV help_execrbrlr1rrrrcs z Pdb.help_execcCs tdSr0)rr1rrrhelp_pdbsz Pdb.help_pdbcCstj|rtj|r|Stjtjd|}tj|rP|||jkrP|Stj|\}}|dkrp|d}tj|r|StjD]>}tj |rt |}qtj||}tj|r|SqdS)Nrr6r) rIrJisabsexistsrr<rqrAsplitextislinkreadlink)r2rrgrootextdirnamefullnamerrrrs"      zPdb.lookupmodulec Csrd|_d|_ddl}||\}}}||j|_ddl}|j |j d|j|j |j |t d||dS)NTFr__main__)r__file__ __package__ __loader____spec__ __builtins__)rBr)runpy_get_module_detailsrqrrrArn__dict__r`updateparentloaderrsr)r2 module_namertmod_namemod_specr,rnrrr _runmodules  zPdb._runmodulecCsddl}|j|jd|tdd|_|||_d|_t |"}d| |jf}Wdn1sp0Y| |dS)Nrrn)rrorsTFzexec(compile(%r, %r, 'exec'))) rnrvr`rwrsrBrqrAr)io open_codereadr)r2rrnr statementrrr _runscripts     "zPdb._runscript)r4NNNFT)r)N)rN)yrrrrr9rZr[r\rirfrprurtr|rrzrrorrrrmrrVrrrrrZcomplete_commandsrrZdo_bZcomplete_breakZ complete_brZcomplete_tbreakrrrZcomplete_enablerZcomplete_disablerZcomplete_conditionr Zcomplete_ignorerZdo_clZcomplete_clearZ complete_clrZdo_wZdo_btrrZdo_urZdo_drZdo_untrZdo_srZdo_nr!Z do_restartr"Zdo_rr#Zdo_cZdo_contr$Zdo_jr(Zcomplete_debugr+Zdo_qZdo_exitr,r5Zdo_ar6Zdo_rvr7rrr9r:r<Zcomplete_printZ complete_pZ complete_pprEZdo_lrFZdo_llrHZcomplete_sourcerArQZcomplete_whatisrSZcomplete_displayrTrUrXrZr[r]rr line_prefixryr_Zdo_hrcrdrr}rrrrrr s /     M ]!!.   1  ! #    r )"rwhereZdownZupbreakZtbreakr`rrr Z conditionrMsteprZuntilZjumpreturnZretvalrcontinuer)Zlonglistrr'ppZwhatissourceZdisplayZ undisplayrWrZunaliasdebugquitrz cCst|||dSr0)r rrrrrrrrIsrcCst|||Sr0)r r )Z expressionrrrrrr Lsr cCst|||dSr0)rrrrrr Osr cOstj|i|Sr0)r r )rkwdsrrrr Ssr )headercCs,t}|dur|||tjdSr0)r rVrr< _getframef_back)rpdbrrrrVs rcCsB|durtd}|dur$tdt}||d|dS)NrzAA valid traceback must be passed if no exception is being handled)r<rrr r[ro)tr'rrrr^s rcCsttjdSr0)rr<last_tracebackrrrrr lsr zimport x; x.main()cCs ttdSr0)rTESTCMDrrrrtesttsrcCsddl}|tdSr()pydocZpagerrb)rrrrrxsrausage: pdb.py [-c command] ... [-m module | pyfile] [arg] ... Debug the Python program given by pyfile. Alternatively, an executable module or package to debug can be specified using the -m switch. Initial commands are read from .pdbrc files in your home directory and in the current directory, if they exist. Commands supplied with -c are executed after commands from .pdbrc files. To let the script run until an exception occurs, use "-c continue". To let the script run up to a given line X in the debugged file, use "-c 'until X'".c CsXddl}|tjdddddg\}}|s>tttdg}d}|D]B\}}|dvrltttqJ|d vr||qJ|d vrJd }qJ|d}|stj |std |d td|rddl }z| |Wn$t yt tdYn0|tjdd<|s.tj|}tj|tjd<t} | j|z6|rT| |n | || jrlWqTtdWntytd|dtddtjddYntytdddttdYnptyt tdYnLt tdtdtd} | d| td|dYn0q@dS)Nrrzmhc:rzcommand=rF)z-hz--help)z-cz --command)z-mTzError:zdoes not existz*The program finished and will be restartedZ Restartingzwith arguments:rKrz/The program exited via sys.exit(). Exit status:)rz2Uncaught exception. Entering post mortem debuggingz1Running 'cont' or 'step' will restart the programz#Post mortem debugger finished. The z will be restarted)getoptr<rr_usageexitrrIrJrfrtrurr print_excrealpathrlr rHrLr}rr)rr SystemExitr SyntaxErrorro) rZoptsrrMZ run_as_moduleoptZoptargrArtrrrrrmainsr                  rrn)NN)NN)N)/rIr~rr<r:r7r*r,rr;rr"rrrrr__all__r r'r.rr/rr8r;r rbZ _help_orderZ_commandrwrlrcrr r r rrr rrrrrrrrrrrFsl    7     L