mfc @sdZddlZddlZddlZddlZddlmZddlZddlZddl Z ddl Z de fdYZ eZ de _e jZddd d d d d ddg ZdZdZd ejejfdYZeedZeedZdZdZdZedZdZdZdZdZ dZ!e"dkrddl#Z#e#j!ndS(sA Python debugger.iN(tReprtRestartcBseZdZRS(sBCauses a debugger to be restarted for the debugged python program.(t__name__t __module__t__doc__(((s/usr/lib64/python2.7/pdb.pyRsitruntpmtPdbtrunevaltrunctxtruncallt set_tracet post_mortemthelpcCstjdtj|}yt|}Wntk r@dSXd}d}xK|j}|dkrlPn|j|r|||f}Pn|d}qP|j|S(Nsdef\s+%s\s*[(]it( tretcompiletescapetopentIOErrortNonetreadlinetmatchtclose(tfuncnametfilenametcretfptlinenotanswertline((s/usr/lib64/python2.7/pdb.pyt find_functions"     s -> cBsDeZddldldldZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZejjZdZddZdZeZdZdZdZdZdZdZ dZ!dZ"e"Z#dZ$e$Z%e$Z&dZ'e'Z(dZ)e)Z*d Z+e+Z,d!Z-e-Z.d"Z/e/Z0d#Z1e1Z2d$Z3e3Z4d%Z5e5Z6Z7d&Z8e8Z9d'Z:d(Z;e;Z<e;Z=d)Z>d*Z?e?Z@d+ZAeAZBd,ZCd-ZDd.ZEd/ZFeFZGd0ZHd1ZId2ZJd3d4d5d6d7d8gZKd9ZLeMd:ZNd;ZOd<ZPd=ZQd>ZReRZSd?ZTd@ZUdAZVdBZWdCZXdDZYdEZZdFZ[dGZ\dHZ]dIZ^dJZ_dKZ`dLZadMZbdNZcdOZddPZedQZfdRZgdSZhdTZidUZjdVZkdWZldXZmdYZndZZod[Zpd\Zqd]Zrd^Zsd_Ztd`ZudaZvevZwdbZxdcZyeyZzddZ{deZ|dfZ}dgZ~dhZdiZdjZdkZRS(mttabc Cstjj|d|tjj|||||rAd|_nd|_i|_d|_d|_ yddl }Wnt k rnXg|_ dt jkrt jd}ytt jj|d}Wntk rqXx$|jD]}|j j|qW|jnytd}Wntk r8n2Xx$|jD]}|j j|qFW|ji|_i|_i|_t|_d|_dS(Ntskipis(Pdb) RitHOMEs.pdbrc(tbdbtBdbt__init__tcmdtCmdt use_rawinputtprompttaliasest mainpyfilet_wait_for_mainpyfileRt ImportErrortrcLinestostenvironRtpathtjoinRt readlinestappendRtcommandstcommands_doprompttcommands_silenttFalsetcommands_definingRt commands_bnum( tselft completekeytstdintstdoutR!RtenvHometrcFileR((s/usr/lib64/python2.7/pdb.pyR%=sD                cCstjj||jdS(N(R#R$tresettforget(R;((s/usr/lib64/python2.7/pdb.pyRAkscCs(d|_g|_d|_d|_dS(Ni(RRtstacktcurindextcurframe(R;((s/usr/lib64/python2.7/pdb.pyRBos   cCs\|j|j||\|_|_|j|jd|_|jj|_|jdS(Ni(RBt get_stackRCRDREtf_localstcurframe_localst execRcLines(R;tftt((s/usr/lib64/python2.7/pdb.pytsetupus  cCso|jrk|j}g|_xM|D]B}|d }t|dkr"|ddkr"|j|q"q"WndS(Niit#(R.tlentonecmd(R;R.R((s/usr/lib64/python2.7/pdb.pyRIs     "cCs@|jr dS|j|r<|jdIJ|j|dndS(snThis method is called when there is the remote possibility that we ever need to stop in this function.Ns--Call--(R,t stop_hereR>t interactionR(R;tframet argument_list((s/usr/lib64/python2.7/pdb.pyt user_calls   cCsl|jrF|j|j|jjks6|jdkr:dSd|_n|j|rh|j|dndS(s;This function is called when we stop or break at this line.iN( R,R+tcanonictf_codet co_filenametf_linenot bp_commandsRQR(R;RR((s/usr/lib64/python2.7/pdb.pyt user_lines  cCst|dtr|j|jkr|j}d|_|j}|j|dx"|j|D]}|j|q]W||_|j|s|j |j |j n|j |r|j n|jdSdS(sCall every command that was set for the current active breakpoint (if there is one). Returns True if the normal interaction function must be called, False otherwise.t currentbpiNi(tgetattrR8R[R5tlastcmdRLRROR7tprint_stack_entryRCRDR6tcmdloopRB(R;RRR[t lastcmd_backR((s/usr/lib64/python2.7/pdb.pyRYs         cCs;|jr dS||jd<|jdIJ|j|ddS(s7This function is called when a return trap is set here.Nt __return__s --Return--(R,RGR>RQR(R;RRt return_value((s/usr/lib64/python2.7/pdb.pyt user_returns    cCs|jr dS|\}}}||f|jdt _safereprRQ(R;RRtexc_infotexc_typet exc_valuet exc_tracebackt exc_type_name((s/usr/lib64/python2.7/pdb.pytuser_exceptions   cCs?|j|||j|j|j|j|jdS(N(RLR^RCRDR_RB(R;RRt traceback((s/usr/lib64/python2.7/pdb.pyRQs cCs|dk rt|GHndS(s{Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins. N(Rtrepr(R;tobj((s/usr/lib64/python2.7/pdb.pyt displayhooks c Bs#|d dkr|d}n|j}|jj}ye|ddd}ej}ej}ej}z2|je_|je_|je_|||UWd|e_|e_|e_XWndejd \}} e |e dkr|} n |j } |jdI| d I| IJnXdS( Nit!s stsingleiRs***Re( RHREt f_globalsRtsysR>R=RqRhRfR( R;Rtlocalstglobalstcodet save_stdoutt save_stdintsave_displayhookRKtvRl((s/usr/lib64/python2.7/pdb.pytdefaults.             cCs|js|S|j}x|d|jkr|j|d}d}x8|dD],}|jdt||}|d}qTW|jddj|d}|j}qW|ddkr|jd}|dkr||dj}|jj ||| j }qn|S( s*Handle alias expansion and ';;' separator.iit%s%*t taliass;;i( tstriptsplitR*treplacetstrR2tfindtlstriptcmdqueueR4trstrip(R;RtargstiittmpArgtmarkertnext((s/usr/lib64/python2.7/pdb.pytprecmds&    cCs-|jstjj||S|j|SdS(sInterpret the argument as though it had been typed in response to the prompt. Checks whether this line is typed at the normal prompt or in a breakpoint command list definition. N(R9R&R'ROthandle_command_def(R;R((s/usr/lib64/python2.7/pdb.pyROs cCs|j|\}}}|s"dS|dkrBt|j|jR:R5RR6R8R7R)R9R_(R;Rtbnumt prompt_back((s/usr/lib64/python2.7/pdb.pyt do_commands=s$         icCs |sS|jrO|jdIJx0tjjD]}|r)|j|jq)q)WndSd}d}d}|jd}|dkr||dj}|| j }n|j d}d} |dkrn|| j }|j |} | s|jdIt |I|jdIJdS| }||dj}yt |}Wq|tk rj} |jdI|IJdSXnyt |}Wntk r{yt||jj|j} Wn |} nXyCt| d r| j} n| j} | j} | j}| j}Wq||j|\}}}|sb|jd I|jt |I|jd IJ|jd IJdS|} t |}q|XnX|s|j}n|j||}|r|j||||| }|r|jd I|IJq|j||d}|jd|j|j|j fIJndS(Ns!Num Type Disp Enb Wheret,iiRes*** snot found from sys.paths*** Bad lineno:tim_funcs*** The specified objectsis not a functions or was not found along sys.path.s***isBreakpoint %d at %s:%d(!tbreaksR>R#RRtbpprintRRRRtrfindt lookupmoduleRoRt ValueErrortevalRERtRHthasattrRt func_codetco_nametco_firstlinenoRWtlineinfot defaultFilet checklinet set_breakt get_breakstnumbertfileR(R;Rt temporarytbpRRtcondtcommatcolonRRJtmsgRRxtoktlnRterr((s/usr/lib64/python2.7/pdb.pytdo_breakXs                cCs4|jjj}|dkr0|jr0|j}n|S(sProduce a reasonable default.s(RERVRWR+(R;R((s/usr/lib64/python2.7/pdb.pyRs cCs|j|ddS(Ni(R(R;R((s/usr/lib64/python2.7/pdb.pyt do_tbreaksc Cs"d}|jd}t|dkr:|dj}n)t|dkr_|dj}n|S|dkrs|S|jd}|ddkr|d=t|dkr|Sn|j}t|dkr|d}n,|j|d}|r|}n|d}t||} | p!|S( Nt'iiiRt.R;(NNN(RRRNRRRR( R;t identifiertfailedtidstringtidtpartstfnametitemRJR((s/usr/lib64/python2.7/pdb.pyRs.     cCst|dr|jjnd }tj|||}|sM|jdIJdS|j}| s|ddks|d dks|d dkr|jdIJdS|S( sCheck whether specified line seems to be executable. Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank line or EOF). Warning: testing is not comprehensive. REs End of fileiRMis"""s'''s*** Blank or commentN(RRERtRt linecachetgetlineR>R(R;RRtglobsR((s/usr/lib64/python2.7/pdb.pyRs!    cCs|j}x|D]}yt|}Wn%tk rP|jd|IJqnXd|kotttjjkns|jdI|IJqntjj|}|r|jqqWdS(Ns#Breakpoint index %r is not a numberisNo breakpoint numbered( RRRR>RNR#RRtenable(R;RRtiR((s/usr/lib64/python2.7/pdb.pyt do_enables   (cCs|j}x|D]}yt|}Wn%tk rP|jd|IJqnXd|kotttjjkns|jdI|IJqntjj|}|r|jqqWdS(Ns#Breakpoint index %r is not a numberisNo breakpoint numbered( RRRR>RNR#RRtdisable(R;RRRR((s/usr/lib64/python2.7/pdb.pyt do_disables   (cCs|jdd}yt|dj}Wn'tk rU|jd|dIJdSXy|d}Wn d}nXytjj|}Wn't k r|jd|dIJdSX|r||_ |s|jdI|I|jdIJqndS(NRiis#Breakpoint index %r is not a numbers Breakpoint index %r is not validRsis now unconditional.( RRRRR>RR#RRt IndexErrorR(R;RRtbpnumRR((s/usr/lib64/python2.7/pdb.pyt do_conditions*    cCs?|j}yt|dj}Wn'tk rO|jd|dIJdSXyt|dj}Wn d}nXytjj|}Wn'tk r|jd|dIJdSX|r;||_ |dkrd}|dkr|d|}n |d}|j|d |IJq;|jd I|j|Id IJndS( s*arg is bp number followed by ignore count.is#Breakpoint index %r is not a numberNis Breakpoint index %r is not validsWill ignore next s %d crossingss 1 crossings of breakpoint %d.sWill stop next time breakpoints is reached.( RRRRR>R#RRRtignore(R;RRRtcountRtreply((s/usr/lib64/python2.7/pdb.pyt do_ignore(s4         cCs|s_ytd}Wntk r/d}nX|jj}|dkr[|jndSd|kr|jd}|| }||d}yt|}Wntk rd|}nX|j||}|r|j d I|IJndS|j }x|D]}yt|}Wn%tk rB|j d |IJqnXd |koft t j jkns|j d I|IJqn|j|}|r|j d I|IJq|j d I|IJqWdS(sThree possibilities, tried in this order: clear -> clear all breaks, ask for confirmation clear file:lineno -> clear all breaks at file:lineno clear bpno bpno ... -> clear breakpoints by numbersClear all breaks? tnotytyesNReisInvalid line number (%s)s***s#Breakpoint index %r is not a numberisNo breakpoint numberedsDeleted breakpoint(Rsyes(t raw_inputtEOFErrorRtlowertclear_all_breaksRRRt clear_breakR>RRNR#RRtclear_bpbynumber(R;RRRRRRt numberlist((s/usr/lib64/python2.7/pdb.pytdo_clearHsF          (cCs|jdS(N(tprint_stack_trace(R;R((s/usr/lib64/python2.7/pdb.pytdo_whereuscCsy|jdkr|jdIJnV|jd|_|j|jd|_|jj|_|j|j|jd|_dS(Nis*** Oldest framei( RDR>RCRERGRHR^RR(R;R((s/usr/lib64/python2.7/pdb.pytdo_upzscCs|jdt|jkr,|jdIJnV|jd|_|j|jd|_|jj|_|j|j|jd|_ dS(Nis*** Newest framei( RDRNRCR>RERGRHR^RR(R;R((s/usr/lib64/python2.7/pdb.pytdo_downscCs|j|jdS(Ni(t set_untilRE(R;R((s/usr/lib64/python2.7/pdb.pytdo_untilscCs|jdS(Ni(tset_step(R;R((s/usr/lib64/python2.7/pdb.pytdo_steps cCs|j|jdS(Ni(tset_nextRE(R;R((s/usr/lib64/python2.7/pdb.pytdo_nextscCsN|rDddl}tjdd!}|j|t_|tjd*ntdS(sRestart program by raising an exception to be caught in the main debugger loop. If arguments were given, set them in sys.argv.iNii(tshlexRutargvRR(R;RRtargv0((s/usr/lib64/python2.7/pdb.pytdo_runs  cCs|j|jdS(Ni(t set_returnRE(R;R((s/usr/lib64/python2.7/pdb.pyt do_returnscCs|jdS(Ni(t set_continue(R;R((s/usr/lib64/python2.7/pdb.pyt do_continues cCs|jdt|jkr-|jdIJdSyt|}Wntk r]|jdIJnuXyK||j_|j|jd|f|j|j<|j|j|jWn&tk r}|jdI|IJnXdS(Nis-*** You can only jump within the bottom frames.*** The 'jump' command requires a line number.is*** Jump failed:( RDRNRCR>RRRERXR^(R;Rte((s/usr/lib64/python2.7/pdb.pytdo_jumps   $cCstjd|jj}|j}t|j|j|j }d|j j |_ |j dIJtj |j |||f|j dIJtj|j|j|_dS(Ns(%s) sENTERING RECURSIVE DEBUGGERsLEAVING RECURSIVE DEBUGGER(RutsettraceRRERtRHRR<R=R>R)Rt call_tracingRttrace_dispatchR](R;RRwRvtp((s/usr/lib64/python2.7/pdb.pytdo_debugs     cCsd|_|jdS(Ni(t_user_requested_quittset_quit(R;R((s/usr/lib64/python2.7/pdb.pytdo_quits  cCs|jJd|_|jdS(Ni(R>RR(R;R((s/usr/lib64/python2.7/pdb.pytdo_EOFs  cCs|jj}|j}|j}|jd@r8|d}n|jd@rR|d}nxat|D]S}|j|}|j|IdI||kr|j||IJq_|jdIJq_WdS(Niiit=s*** undefined ***(RERVRHt co_argcounttco_flagstranget co_varnamesR>(R;RtcotdicttnRtname((s/usr/lib64/python2.7/pdb.pytdo_argss       cCs7d|jkr&|j|jdIJn |jdIJdS(NRas*** Not yet returned!(RHR>(R;R((s/usr/lib64/python2.7/pdb.pyt do_retvalscCsyt||jj|jSWndtjd \}}t|trQ|}n |j}|j dI|dIt |IJnXdS(Nis***Re( RRERtRHRuRht isinstanceRRR>Ro(R;RRKR|Rl((s/usr/lib64/python2.7/pdb.pyt_getvals  #cCs.y |jt|j|IJWnnXdS(N(R>RoR (R;R((s/usr/lib64/python2.7/pdb.pytdo_ps cCs.y tj|j||jWnnXdS(N(tpprintR R>(R;R((s/usr/lib64/python2.7/pdb.pytdo_pps c Cs2d|_d}|ryt|ii}t|td kr|\}}t|}t|}||kr||}qntdt|d}Wq|jdIt|IJdSXn8|jdkrtd|j j d}n |jd}|dkr|d}n|j j j }|j |}yxt||dD]}tj|||j j}|s|jdIJPqIt|jd} t| dkr| d } n||kr| d } n | d } ||j j kr| d } n|j| d |I||_qIWWntk r-nXdS(Ntlistiis*** Error in argument:i s[EOF]iiRtBs->s ((R]RRRfRtmaxR>RoRRERXRVRWtget_file_breaksRRRRttrjustRNtKeyboardInterrupt( R;RtlasttxtfirstRt breaklistRRts((s/usr/lib64/python2.7/pdb.pytdo_listsR               cCsyt||jj|j}Wnktjd \}}t|tdkr\|}n |j}|jdI|dIt |IJdSXd}y |j }WnnX|r|jdI|j IJdSy|j j }WnnX|r|jdI|j IJdS|jt|IJdS(NiRs***RetFunctiontMethod(RRERtRHRuRhRfRR>RoRRRR(R;RtvalueRKR|RlRx((s/usr/lib64/python2.7/pdb.pyt do_whatis<s4  # cCs|j}t|dkrj|jj}|jx,|D]$}|jd||j|fIJq>WdS|d|jkrt|dkr|jd|d|j|dfIJndj|d|j|dR2(R;RRRR((s/usr/lib64/python2.7/pdb.pytdo_aliasWs   "%)cCsJ|j}t|dkr"dS|d|jkrF|j|d=ndS(Ni(RRNR*(R;RR((s/usr/lib64/python2.7/pdb.pyt do_unaliasds  RRRRRRcCs=y%x|jD]}|j|q WWntk r8nXdS(N(RCR^R(R;t frame_lineno((s/usr/lib64/python2.7/pdb.pyRvs  cCsU|\}}||jkr+|jdIn |jdI|j|j||IJdS(Nt>R(RER>tformat_stack_entry(R;R#t prompt_prefixRRR((s/usr/lib64/python2.7/pdb.pyR^}s   cCs|jdS(N(thelp_h(R;((s/usr/lib64/python2.7/pdb.pyt help_helpscCs|jdIJdS(Nsh(elp) Without argument, print the list of available commands. With a command name as argument, print help about that command "help pdb" pipes the full documentation file to the $PAGER "help exec" gives help on the ! command(R>(R;((s/usr/lib64/python2.7/pdb.pyR'scCs|jdS(N(thelp_w(R;((s/usr/lib64/python2.7/pdb.pyt help_wherescCs|jdIJdS(Nsw(here) Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current frame", which determines the context of most commands. 'bt' is an alias for this command.(R>(R;((s/usr/lib64/python2.7/pdb.pyR)scCs|jdS(N(thelp_d(R;((s/usr/lib64/python2.7/pdb.pyt help_downscCs|jdIJdS(NsSd(own) Move the current frame one level down in the stack trace (to a newer frame).(R>(R;((s/usr/lib64/python2.7/pdb.pyR+scCs|jdS(N(thelp_u(R;((s/usr/lib64/python2.7/pdb.pythelp_upscCs|jdIJdS(NsPu(p) Move the current frame one level up in the stack trace (to an older frame).(R>(R;((s/usr/lib64/python2.7/pdb.pyR-scCs|jdS(N(thelp_b(R;((s/usr/lib64/python2.7/pdb.pyt help_breakscCs|jdIJdS(NsFb(reak) ([file:]lineno | function) [, condition] With a line number argument, set a break there in the current file. With a function name, set a break at first executable line of that function. Without argument, list all breaks. If a second argument is present, it is a string specifying an expression which must evaluate to true before the breakpoint is honored. The line number may be prefixed with a filename and a colon, to specify a breakpoint in another file (probably one that hasn't been loaded yet). The file is searched for on sys.path; the .py suffix may be omitted.(R>(R;((s/usr/lib64/python2.7/pdb.pyR/s cCs|jdS(N(thelp_cl(R;((s/usr/lib64/python2.7/pdb.pyt help_clearscCs|jdIJ|jdIJdS(Nscl(ear) filename:linenoscl(ear) [bpnumber [bpnumber...]] With a space separated list of breakpoint numbers, clear those breakpoints. Without argument, clear all breaks (but first ask confirmation). With a filename:lineno argument, clear all breaks at that line in that file. Note that the argument is different from previous versions of the debugger (in python distributions 1.5.1 and before) where a linenumber was used instead of either filename:lineno or breakpoint numbers.(R>(R;((s/usr/lib64/python2.7/pdb.pyR1s  cCs|jdIJdS(NsJtbreak same arguments as break, but breakpoint is removed when first hit.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_tbreakscCs|jdIJdS(Nseenable bpnumber [bpnumber ...] Enables the breakpoints given as a space separated list of bp numbers.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_enablescCs|jdIJdS(Nsgdisable bpnumber [bpnumber ...] Disables the breakpoints given as a space separated list of bp numbers.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_disablescCs|jdIJdS(Ns(ignore bpnumber count Sets the ignore count for the given breakpoint number. A breakpoint becomes active when the ignore count is zero. When non-zero, the count is decremented each time the breakpoint is reached and the breakpoint is not disabled and any associated condition evaluates to true.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_ignorescCs|jdIJdS(Nscondition bpnumber str_condition str_condition is a string specifying an expression which must evaluate to true before the breakpoint is honored. If str_condition is absent, any existing condition is removed; i.e., the breakpoint is made unconditional.(R>(R;((s/usr/lib64/python2.7/pdb.pythelp_conditionscCs|jdS(N(thelp_s(R;((s/usr/lib64/python2.7/pdb.pyt help_stepscCs|jdIJdS(Nss(tep) Execute the current line, stop at the first possible occasion (either in a function that is called or in the current function).(R>(R;((s/usr/lib64/python2.7/pdb.pyR8scCs|jdS(N(thelp_unt(R;((s/usr/lib64/python2.7/pdb.pyt help_untilscCs dGHdS(Nsunt(il) Continue execution until the line with a number greater than the current one is reached or until the current frame returns((R;((s/usr/lib64/python2.7/pdb.pyR:scCs|jdS(N(thelp_n(R;((s/usr/lib64/python2.7/pdb.pyt help_nextscCs|jdIJdS(Ns_n(ext) Continue execution until the next line in the current function is reached or it returns.(R>(R;((s/usr/lib64/python2.7/pdb.pyR<scCs|jdS(N(thelp_r(R;((s/usr/lib64/python2.7/pdb.pyt help_returnscCs|jdIJdS(Ns?r(eturn) Continue execution until the current function returns.(R>(R;((s/usr/lib64/python2.7/pdb.pyR>scCs|jdS(N(thelp_c(R;((s/usr/lib64/python2.7/pdb.pyt help_continue scCs|jdS(N(R@(R;((s/usr/lib64/python2.7/pdb.pyt help_cont scCs|jdIJdS(NsLc(ont(inue)) Continue execution, only stop when a breakpoint is encountered.(R>(R;((s/usr/lib64/python2.7/pdb.pyR@scCs|jdS(N(thelp_j(R;((s/usr/lib64/python2.7/pdb.pyt help_jumpscCs|jdIJdS(Ns6j(ump) lineno Set the next line that will be executed.(R>(R;((s/usr/lib64/python2.7/pdb.pyRCscCs|jdIJdS(Nsdebug code Enter a recursive debugger that steps through the code argument (which is an arbitrary expression or statement to be executed in the current environment).(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_debugscCs|jdS(N(thelp_l(R;((s/usr/lib64/python2.7/pdb.pyt help_list!scCs|jdIJdS(Ns8l(ist) [first [,last]] List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With one argument, list 11 lines starting at that line. With two arguments, list the given range; if the second argument is less than the first, it is a count.(R>(R;((s/usr/lib64/python2.7/pdb.pyRF$scCs|jdS(N(thelp_a(R;((s/usr/lib64/python2.7/pdb.pyt help_args-scCs|jdIJdS(Ns3a(rgs) Print the arguments of the current function.(R>(R;((s/usr/lib64/python2.7/pdb.pyRH0scCs|jdIJdS(Ns/p expression Print the value of the expression.(R>(R;((s/usr/lib64/python2.7/pdb.pythelp_p4scCs|jdIJdS(Ns7pp expression Pretty-print the value of the expression.(R>(R;((s/usr/lib64/python2.7/pdb.pythelp_pp8scCs|jdIJdS(Ns[(!) statement Execute the (one-line) statement in the context of the current stack frame. The exclamation point can be omitted unless the first word of the statement resembles a debugger command. To assign to a global variable you must always prefix the command with a 'global' command, e.g.: (Pdb) global list_options; list_options = ['-l'] (Pdb)(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_exec<scCs dGHdS(Nsrun [args...] Restart the debugged python program. If a string is supplied, it is splitted with "shlex" and the result is used as the new sys.argv. History, breakpoints, actions and debugger options are preserved. "restart" is an alias for "run".((R;((s/usr/lib64/python2.7/pdb.pythelp_runGscCs|jdS(N(thelp_q(R;((s/usr/lib64/python2.7/pdb.pyt help_quitPscCs|jdIJdS(NsOq(uit) or exit - Quit from the debugger. The program being executed is aborted.(R>(R;((s/usr/lib64/python2.7/pdb.pyRNSscCs|jdIJdS(Ns+whatis arg Prints the type of the argument.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_whatisYscCs|jdIJdS(Ns,EOF Handles the receipt of EOF as a command.(R>(R;((s/usr/lib64/python2.7/pdb.pythelp_EOF]scCs|jdIJdS(Nsalias [name [command [parameter parameter ...]]] Creates an alias called 'name' the executes 'command'. The command must *not* be enclosed in quotes. Replaceable parameters are indicated by %1, %2, and so on, while %* is replaced by all the parameters. If no command is given, the current alias for name is shown. If no name is given, all aliases are listed. Aliases may be nested and can contain anything that can be legally typed at the pdb prompt. Note! You *can* override internal pdb commands with aliases! Those internal commands are then hidden until the alias is removed. Aliasing is recursively applied to the first word of the command line; all other words in the line are left alone. Some useful aliases (especially when placed in the .pdbrc file) are: #Print instance variables (usage "pi classInst") alias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k] #Print instance variables in self alias ps pi self (R>(R;((s/usr/lib64/python2.7/pdb.pyt help_aliasascCs|jdIJdS(Ns)unalias name Deletes the specified alias.(R>(R;((s/usr/lib64/python2.7/pdb.pyt help_unaliasyscCs|jdIJdS(Nscommands [bpnumber] (com) ... (com) end (Pdb) Specify a list of commands for breakpoint number bpnumber. The commands themselves appear on the following lines. Type a line containing just 'end' to terminate the commands. To remove all commands from a breakpoint, type commands and follow it immediately with end; that is, give no commands. With no bpnumber argument, commands refers to the last breakpoint set. You can use breakpoint commands to start your program up again. Simply use the continue command, or step, or any other command that resumes execution. Specifying any command resuming execution (currently continue, step, next, return, jump, quit and their abbreviations) terminates the command list (as if that command was immediately followed by end). This is because any time you resume execution (even with a simple next or step), you may encounter another breakpoint--which could have its own command list, leading to ambiguities about which list to execute. If you use the 'silent' command in the command list, the usual message about stopping at a breakpoint is not printed. This may be desirable for breakpoints that are to print a specific message and then continue. If none of the other commands print anything, you see no sign that the breakpoint was reached. (R>(R;((s/usr/lib64/python2.7/pdb.pyt help_commands}s cCs tdS(N(R (R;((s/usr/lib64/python2.7/pdb.pythelp_pdbscCs$tjj|r(tjj|r(|Stjjtjd|}tjj|rr|j||jkrr|Stjj|\}}|dkr|d}ntjj|r|SxdtjD]Y}x%tjj |rtj |}qWtjj||}tjj|r|SqWdS(sHelper function for break/clear parsing -- may be overridden. lookupmodule() translates (possibly incomplete) file or module name into an absolute file name. iRs.pyN( R/R1tisabstexistsR2RuRUR+tsplitexttislinktreadlinkR(R;RRJtroottexttdirnametfullname((s/usr/lib64/python2.7/pdb.pyRs"$*  cCs}ddl}|jj|jjidd6|d6td6d|_|j||_d|_d|}|j |dS( Nit__main__Rt__file__t __builtins__iis execfile(%r)( R_t__dict__tcleartupdateRaR,RUR+RR(R;RR_t statement((s/usr/lib64/python2.7/pdb.pyt _runscripts      N(RRRR%RARBRLRIRTRZRYRcRmRQRqR}RRORR&R'tdo_helptdo_hRRRtdo_bRRRRRRRRtdo_clRtdo_wtdo_btRtdo_uRtdo_dRtdo_untRtdo_sRtdo_nRt do_restartRtdo_rRtdo_ctdo_contRtdo_jRRtdo_qtdo_exitRRtdo_aR tdo_rvR R RRtdo_lRR!R"RRt line_prefixR^R(R'R*R)thelp_btR,R+R.R-R0R/R2R1R3R4R5R6R7R9R8R;R:R=R<R?R>RARBR@RDRCRERGRFRIRHRJRKRLRMt help_restartRORNt help_exitRPRQRRRSRTRURRf(((s/usr/lib64/python2.7/pdb.pyR;s.            S   !     +                  ,                                              #  cCstj|||dS(N(RR(ReRwRv((s/usr/lib64/python2.7/pdb.pyRscCstj|||S(N(RR(t expressionRwRv((s/usr/lib64/python2.7/pdb.pyRscCst|||dS(N(R(ReRwRv((s/usr/lib64/python2.7/pdb.pyR scOstj||S(N(RR (Rtkwds((s/usr/lib64/python2.7/pdb.pyR scCstjtjjdS(N(RR Rut _getframetf_back(((s/usr/lib64/python2.7/pdb.pyR scCsa|dkr:tjd}|dkr:tdq:nt}|j|jd|dS(NisAA valid traceback must be passed if no exception is being handled(RRuRhRRRARQ(RKR((s/usr/lib64/python2.7/pdb.pyR s    cCsttjdS(N(R Rutlast_traceback(((s/usr/lib64/python2.7/pdb.pyRssimport x; x.main()cCsttdS(N(RtTESTCMD(((s/usr/lib64/python2.7/pdb.pyttestscCsqxjtjD]V}tjj|d}tjj|r tjd|}|r\dG|GHnPq q WdGdGHdS(Nspdb.docs${PAGER-more} s*** Pager exit status:s)Sorry, can't find the help file "pdb.doc"salong the Python search path(RuR1R/R2RWtsystem(R]R^tsts((s/usr/lib64/python2.7/pdb.pyR s cCsvtjd s!tjddkr6dGHtjdntjd}tjj|srdG|GdGHtjdntjd=tjj|tjdsH                    ,