ó ›à Rc@sRddlZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(iÿÿÿÿNtFrameDecoratorcBsneZdZd„Zed„ƒZd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z RS( s)Basic implementation of a Frame DecoratorcCs ||_dS(N(t_base(tselftbase((s+/usr/share/gdb/python/gdb/FrameDecorator.pyt__init__3scCsU|jƒ}|j sM|jj sM|jƒtjksM|jƒtjkrQtStS(sIInternal utility to determine if the frame is special or limited.( tfind_saltsymtabtfilenamettypetgdbt DUMMY_FRAMEtSIGTRAMP_FRAMEtTruetFalse(tframetsal((s+/usr/share/gdb/python/gdb/FrameDecorator.pyt_is_limited_frame6s  cCs#t|jdƒr|jjƒSdS(sLReturn any elided frames that this class might be wrapping, or None.telidedN(thasattrRRtNone(R((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRDs cCs§t|jtjƒs7t|jdƒr7|jjƒSn|jƒ}|jƒtjkr\dS|jƒtj krudS|jƒ}|dkr|j ƒ}|St |ƒS(sð Return the name of the frame's function or an address of the function of the frame. First determine if this is a special frame. If not, try to determine filename from GDB's frame internal function API. Finally, if a name cannot be determined return the address. If this function returns an address, GDB will attempt to determine the function name from its internal minimal symbols store (for example, for inferiors without debug-info).tfunctionssN( t isinstanceRR tFrameRRtinferior_frameRR R Rtpctstr(RRtfuncR((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRLs     cCs5t|jdƒr|jjƒS|jƒ}|jƒS(s% Return the address of the frame's pctaddress(RRRRR(RR((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRqs  cCsut|jdƒr|jjƒS|jƒ}|jƒ}|j sN|jj rg|jƒ}tj|ƒS|jjSdS(s’ Return the filename associated with this frame, detecting and returning the appropriate library name is this is a shared library.RN( RRRRRRRR t solib_name(RRRR((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRzs     cCsTt|jdƒr|jjƒS|jƒ}|j|ƒr>dSt|ƒ}|jƒS(s Return an iterable of frame arguments for this frame, if any. The iterable object contains objects conforming with the Symbol/Value interface. If there are no frame arguments, or if this frame is deemed to be a special case, return None.t frame_argsN(RRRRRRt FrameVarstfetch_frame_args(RRtargs((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRŠs   cCsTt|jdƒr|jjƒS|jƒ}|j|ƒr>dSt|ƒ}|jƒS(s Return an iterable of local variables for this frame, if any. The iterable object contains objects conforming with the Symbol/Value interface. If there are no frame locals, or if this frame is deemed to be a special case, return None.t frame_localsN(RRR!RRRRtfetch_frame_locals(RRR ((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR!šs   cCs_t|jdƒr|jjƒS|jƒ}|j|ƒr>dS|jƒ}|rW|jSdSdS(s¾ Return line number information associated with the frame's pc. If symbol table/line information does not exist, or if this frame is deemed to be a special case, return NonetlineN(RRR#RRRR(RRR((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR#ªs   cCs&t|jdƒr|jjƒS|jS(s8 Return the gdb.Frame underpinning this frame decorator.R(RRR(R((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR¼s (t__name__t __module__t__doc__Rt staticmethodRRRRRRR!R#R(((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRs   %    tSymValueWrappercBs)eZdZd„Zd„Zd„ZRS(skA container class conforming to the Symbol/Value interface which holds frame locals or frame arguments.cCs||_||_dS(N(tsymtval(Rtsymboltvalue((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRÈs cCs|jS(s6 Return the value associated with this symbol, or None(R*(R((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR,ÌscCs|jS(sP Return the symbol, or Python text, associated with this symbol, or None(R)(R((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR+Ðs(R$R%R&RR,R+(((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR(Ås  RcBs2eZdZd„Zd„Zd„Zd„ZRS(sOUtility class to fetch and store frame local variables, or frame arguments.cCs\||_ittj6ttj6ttj6ttj6ttj6ttj6ttj 6|_ dS(N( RR R tSYMBOL_LOC_STATICtSYMBOL_LOC_REGISTERtSYMBOL_LOC_ARGtSYMBOL_LOC_REF_ARGtSYMBOL_LOC_LOCALtSYMBOL_LOC_REGPARM_ADDRtSYMBOL_LOC_COMPUTEDt symbol_class(RR((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRÚs       cCs/t|tƒrtS|j}|jj|tƒS(sé Local utility method to determine if according to Symbol type whether it should be included in the iterator. Not all symbols are fetched, and only symbols that return True from this method should be fetched.(Rt basestringR t addr_classR4tgetR (RR)tsym_type((s+/usr/share/gdb/python/gdb/FrameDecorator.pytfetch_bæs  cCs±g}y|jjƒ}Wntk r2d}nXxw|dkr¬|jsT|jrXPnxE|D]=}|jrtq_n|j|ƒr_|jt |dƒƒq_q_W|j }q6W|S(sºPublic utility method to fetch frame local variables for the stored frame. Frame arguments are not fetched. If there are no frame local variables, return an empty list.N( Rtblockt RuntimeErrorRt is_globalt is_statict is_argumentR9tappendR(t superblock(RtlvarsR:R)((s+/usr/share/gdb/python/gdb/FrameDecorator.pyR"ös     cCs«g}y|jjƒ}Wntk r2d}nXx,|dkra|jdkrUPn|j}q6W|dkr§x6|D]+}|jsŠqun|jt|dƒƒquWn|S(sÁPublic utility method to fetch frame arguments for the stored frame. Frame arguments are the only type fetched. If there are no frame argument variables, return an empty list.N( RR:R;RRR@R>R?R((RR R:R)((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRs      (R$R%R&RR9R"R(((s+/usr/share/gdb/python/gdb/FrameDecorator.pyRÕs   (R tobjectRR(R(((s+/usr/share/gdb/python/gdb/FrameDecorator.pyts ³