ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/bdb.pyc

nMc@sdZddkZddkZddkZdddgZdefdYZdfdYZdZdfd	YZ	d
Z
dZdefd
YZdZ
dZdZdS(sDebugger basicsiNtBdbQuittBdbt
BreakpointcBseZdZRS(sException to give up completely(t__name__t
__module__t__doc__(((s/usr/lib/python2.6/bdb.pyR	scBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZddZdZdZdZdZd+dZdZdZdd+d+dZdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%d&Z&d+d+d'Z'd+d+d(Z(d)Z)d*Z*RS(,sGeneric Python debugger base class.

    This class takes care of details of the trace facility;
    a derived class should implement user interaction.
    The standard debugger class (pdb.Pdb) is an example.
    cCsh|_h|_dS(N(tbreakstfncache(tself((s/usr/lib/python2.6/bdb.pyt__init__s	cCss|d|dd!djo|S|ii|}|p5tii|}tii|}||i|<n|S(Nt<iit>(Rtgettostpathtabspathtnormcase(Rtfilenametcanonic((s/usr/lib/python2.6/bdb.pyRscCs3ddk}|id|_|idddS(Ni(t	linecachet
checkcachetNonetbotframet
_set_stopinfo(RR((s/usr/lib/python2.6/bdb.pytreset$s
	cCs|iodS|djo|i|S|djo|i||S|djo|i||S|djo|i||S|djo|iS|djo|iS|djo|iSdGt|GH|iS(	Ntlinetcalltreturnt	exceptiontc_calltc_exceptiontc_returns*bdb.Bdb.dispatch: unknown debugging event:(tquittingt
dispatch_linet
dispatch_calltdispatch_returntdispatch_exceptionttrace_dispatchtrepr(Rtframeteventtarg((s/usr/lib/python2.6/bdb.pyR%*s$







cCsL|i|p|i|o%|i||io
tqEn|iS(N(t	stop_heret
break_heret	user_lineR RR%(RR'((s/usr/lib/python2.6/bdb.pyR!>s
 

cCst|idjo|i|_|iS|i|p
|i|pdS|i|||io
tn|iS(N(	RRtf_backR%R*tbreak_anywheret	user_callR R(RR'R)((s/usr/lib/python2.6/bdb.pyR"Ds 

cCsO|i|p||ijo(|i|||io
tqHn|iS(N(R*treturnframetuser_returnR RR%(RR'R)((s/usr/lib/python2.6/bdb.pyR#Qs
 
cCs?|i|o(|i|||io
tq8n|iS(N(R*tuser_exceptionR RR%(RR'R)((s/usr/lib/python2.6/bdb.pyR$Ws

cCsh||ijo|i|ijSx@|dj	o2||ij	o"||ijotS|i}q$WtS(N(t	stopframetf_linenot
stoplinenoRRtTrueR-tFalse(RR'((s/usr/lib/python2.6/bdb.pyR*ascCs|i|ii}||ijotS|i}||i|jo)|ii}||i|jotSnt|||\}}|o<|i|_	|o$|i
o|it|int
StSdS(N(Rtf_codetco_filenameRR7R4tco_firstlinenot	effectivetnumbert	currentbpt	temporarytdo_cleartstrR6(RR'Rtlinenotbptflag((s/usr/lib/python2.6/bdb.pyR+ls		cCs
tddS(Ns)subclass of bdb must implement do_clear()(tNotImplementedError(RR)((s/usr/lib/python2.6/bdb.pyR?scCs|i|ii|ijS(N(RR8R9R(RR'((s/usr/lib/python2.6/bdb.pyR.scCsdS(snThis method is called when there is the remote possibility
        that we ever need to stop in this function.N((RR't
argument_list((s/usr/lib/python2.6/bdb.pyR/scCsdS(s9This method is called when we stop or break at this line.N((RR'((s/usr/lib/python2.6/bdb.pyR,scCsdS(s5This method is called when a return trap is set here.N((RR'treturn_value((s/usr/lib/python2.6/bdb.pyR1scCs|\}}}dS(N((RR'texc_infotexc_typet	exc_valuet
exc_traceback((s/usr/lib/python2.6/bdb.pyR2sicCs(||_||_d|_||_dS(Ni(R3R0R R5(RR3R0R5((s/usr/lib/python2.6/bdb.pyRs			cCs|i|||iddS(sxStop when the line with the line no greater than the current one is
        reached or when returning from current frameiN(RR4(RR'((s/usr/lib/python2.6/bdb.pyt	set_untilscCs|idddS(sStop after one line of code.N(RR(R((s/usr/lib/python2.6/bdb.pytset_stepscCs|i|ddS(s2Stop on the next line in or below the given frame.N(RR(RR'((s/usr/lib/python2.6/bdb.pytset_nextscCs|i|i|dS(s)Stop when returning from the given frame.N(RR-(RR'((s/usr/lib/python2.6/bdb.pyt
set_returnscCsu|djotii}n|ix*|o"|i|_||_|i}q-W|iti	|idS(spStart debugging from `frame`.

        If frame is not specified, debugging starts from caller's frame.
        N(
Rtsyst	_getframeR-RR%tf_traceRRLtsettrace(RR'((s/usr/lib/python2.6/bdb.pyt	set_traces

	
cCso|i|id|ipNtidtii}x/|o#||ij	o|`|i}q<WndS(N(	RRRRRORRRPR-RQ(RR'((s/usr/lib/python2.6/bdb.pytset_continues

cCs/|i|_d|_d|_tiddS(Ni(RR3RR0R RORR(R((s/usr/lib/python2.6/bdb.pytset_quits		ic
Cs|i|}ddk}|i||}|pd||fS||ijog|i|<n|i|}||jo|i|nt|||||}	dS(NisLine %s:%d does not exist(RRtgetlineRtappendR(
RRRAR>tcondtfuncnameRRtlistRB((s/usr/lib/python2.6/bdb.pyt	set_breaks	

cCs|i|}||ijo	d|S||i|jod||fSx&ti||fD]}|iq`Wtii||fp|i|i|n|i|p|i|=ndS(NsThere are no breakpoints in %ssThere is no breakpoint at %s:%d(RRRtbplisttdeleteMethas_keytremove(RRRARB((s/usr/lib/python2.6/bdb.pytclear_breaks		c	Csuyt|}Wnd|SXyti|}Wntj
od|SX|p	d|S|i|i|idS(Ns"Non-numeric breakpoint number (%s)s#Breakpoint number (%d) out of rangesBreakpoint (%d) already deleted(tintRt
bpbynumbert
IndexErrorR`tfileR(RR)R<RB((s/usr/lib/python2.6/bdb.pytclear_bpbynumbers	
	cCs||i|}||ijo	d|SxC|i|D]4}ti||f}x|D]}|iqVWq6W|i|=dS(NsThere are no breakpoints in %s(RRRR\R](RRRtblistRB((s/usr/lib/python2.6/bdb.pytclear_all_file_breakss	cCsE|ipdSx&tiD]}|o|iqqWh|_dS(NsThere are no breakpoints(RRRbR](RRB((s/usr/lib/python2.6/bdb.pytclear_all_breakss

cCs0|i|}||ijo||i|jS(N(RR(RRRA((s/usr/lib/python2.6/bdb.pyt	get_breakscCsK|i|}||ijo(||i|joti||fpgS(N(RRRR\(RRRA((s/usr/lib/python2.6/bdb.pyt
get_breaks"scCs3|i|}||ijo|i|SgSdS(N(RR(RR((s/usr/lib/python2.6/bdb.pytget_file_breaks(scCs|iS(N(R(R((s/usr/lib/python2.6/bdb.pytget_all_breaks/scCsg}|o|i|jo
|i}nxF|dj	o8|i||if||ijoPn|i}q-W|itdt	|d}x4|dj	o&|i|i|i
f|i}qW|djotdt	|d}n||fS(Nii(ttb_framettb_nextRRWR4RR-treversetmaxtlent	tb_lineno(Rtftttstackti((s/usr/lib/python2.6/bdb.pyt	get_stack5s$




s: cCs<ddk}ddk}|\}}|i|ii}d||f}|iio||ii}n|d}d|ijo|id}	nd}	|	o||i|	}n|d}d|ijo.|id}
|d}||i|
}n|i|||i	}|o|||i
}n|S(Nis%s(%r)s<lambda>t__args__s()t
__return__s->(RR&RR8R9tco_nametf_localsRRVt	f_globalststrip(Rtframe_linenotlprefixRR&R'RARtstargstrvR((s/usr/lib/python2.6/bdb.pytformat_stack_entryIs*




c
Bs|djoddk}|i}n|djo
|}n|iei|ie|ei	p|d}nz(y|||UWne
j
onXWdd|_eidXdS(Nis
i(Rt__main__t__dict__RRORRR%t
isinstancettypestCodeTypeRR (RtcmdtglobalstlocalsR((s/usr/lib/python2.6/bdb.pytrunes 




		cCs|djoddk}|i}n|djo
|}n|iti|it|ti	p|d}nz.yt
|||SWntj
onXWdd|_tidXdS(Nis
i(
RRRRRORRR%RRRtevalRR (RtexprRRR((s/usr/lib/python2.6/bdb.pytrunevalws 




		cCs|i|||dS(N(R(RRRR((s/usr/lib/python2.6/bdb.pytrunctxsc	Osk|iti|id}z-y|||}Wntj
onXWdd|_tidX|S(Ni(RRORRR%RRR (RtfuncRtkwdstres((s/usr/lib/python2.6/bdb.pytruncalls
		N(+RRRR	RRR%R!R"R#R$R*R+R?R.R/R,R1R2RRKRLRMRNRRSRTRUR[R`ReRgRhRiRjRkRlRwRRRRR(((s/usr/lib/python2.6/bdb.pyR
sR		
				
		
															
		
	
							cCstidS(N(RRS(((s/usr/lib/python2.6/bdb.pyRSscBs\eZdZdZhZdgZddddZdZdZ	dZ
ddZRS(	sBreakpoint class

    Implements temporary breakpoints, ignore counts, disabling and
    (re)-enabling, and conditionals.

    Breakpoints are indexed by number through bpbynumber and by
    the file,line tuple using bplist.  The former points to a
    single instance of class Breakpoint.  The latter points to a
    list of such instances since there may be more than one
    breakpoint per line.

    iicCs||_d|_||_||_||_||_d|_d|_d|_	t
i|_t
idt
_|i
i||ii||fo|i||fi|n|g|i||f<dS(Nii(RYRtfunc_first_executable_lineRdRR>RXtenabledtignorethitsRtnextR<RbRWR\R^(RRdRR>RXRY((s/usr/lib/python2.6/bdb.pyR	s									cCsV|i|if}d|i|i<|i|i||i|p|i|=ndS(N(RdRRRbR<R\R_(Rtindex((s/usr/lib/python2.6/bdb.pyR]s
cCs
d|_dS(Ni(R(R((s/usr/lib/python2.6/bdb.pytenablescCs
d|_dS(Ni(R(R((s/usr/lib/python2.6/bdb.pytdisablescCs|djo
ti}n|io
d}nd}|io|d}n|d}|d|i||i|ifIJ|io|d|ifIJn|i	o|d|i	IJn|i
o;|i
djo
d	}nd
}|d|i
|fIJndS(Nsdel  skeep syes  sno   s%-4dbreakpoint   %s at %s:%ds	stop only if %ss	ignore next %d hitsiRts!	breakpoint already hit %d time%s(RROtstdoutR>RR<RdRRXRR(Rtouttdisptss((s/usr/lib/python2.6/bdb.pytbpprints(









N(RRRRR\RRbR	R]RRR(((s/usr/lib/python2.6/bdb.pyRs
				cCsx|ip|i|ijotStS|ii|ijotS|ip|i|_n|i|ijotStS(s;Check whether we should break here because of `b.funcname`.(RYRR4R7R6R8RzR(tbR'((s/usr/lib/python2.6/bdb.pyt
checkfuncnames

cCs'ti||f}x
tdt|D]}||}|idjoq)nt||pq)n|id|_|ip5|idjo|id|_q)q|dfSq)yXt	|i|i
|i}|o2|idjo|id|_q
|dfSnWq)|dfSXq)WdS(sDetermine which breakpoint for this file:line is to be acted upon.

    Called only if we know there is a bpt at this
    location.  Returns breakpoint that was triggered and a flag
    that indicates if it is ok to delete a temporary bp.

    iiN(NN(
RR\trangeRqRRRRXRRR|R{R(RdRR't	possiblesRvRtval((s/usr/lib/python2.6/bdb.pyR;s0

tTdbcBs,eZdZdZdZdZRS(cCs.|ii}|p
d}ndG|G|GHdS(Ns???s+++ call(R8Rz(RR'Rtname((s/usr/lib/python2.6/bdb.pyR/Gs
cCsddk}|ii}|p
d}n|i|ii}|i||i|i}dG|G|iG|GdG|iGHdS(Nis???s+++t:(	RR8RzRR9RVR4R|R}(RR'RRtfnR((s/usr/lib/python2.6/bdb.pyR,Ks
cCs
dG|GHdS(Ns
+++ return((RR'tretval((s/usr/lib/python2.6/bdb.pyR1RscCsdG|GH|idS(Ns
+++ exception(RT(RR't	exc_stuff((s/usr/lib/python2.6/bdb.pyR2Ts	(RRR/R,R1R2(((s/usr/lib/python2.6/bdb.pyRFs			cCs*dG|GdGHt|d}dG|GHdS(Nsfoo(t)i
sbar returned(tbar(tntx((s/usr/lib/python2.6/bdb.pytfooXs
cCsdG|GdGH|dS(Nsbar(Ri((ta((s/usr/lib/python2.6/bdb.pyR]s
cCst}|iddS(Nsimport bdb; bdb.foo(10)(RR(Rt((s/usr/lib/python2.6/bdb.pyttestas	(RROR
Rt__all__t	ExceptionRRRSRRR;RRRR(((s/usr/lib/python2.6/bdb.pyt<module>s	T		5		

ACC SHELL 2018