Current File : //usr/share/gdb/python/gdb/function/caller_is.pyo
�
�� Rc@s\ddlZddlZdejfd��YZdejfd��YZe�e�dS(i����NtCallerIscBs#eZdZd�Zdd�ZRS(srReturn True if the calling function's name is equal to a string.
This function takes one or two arguments.
The first argument is the name of a function; if the calling function's
name is equal to this argument, this function returns True.
The optional second argument tells this function how many stack frames
to traverse to find the calling function.  The default is 1.cCstt|�jd�dS(Nt	caller_is(tsuperRt__init__(tself((s//usr/share/gdb/python/gdb/function/caller_is.pyRsicCsKtj�}x&|dkr4|j�}|d}qW|j�|j�kS(Nii(tgdbtselected_frametoldertnametstring(RRtnframestframe((s//usr/share/gdb/python/gdb/function/caller_is.pytinvoke s
(t__name__t
__module__t__doc__RR(((s//usr/share/gdb/python/gdb/function/caller_is.pyRs	t
CallerMatchescBs#eZdZd�Zdd�ZRS(snReturn True if the calling function's name matches a string.
This function takes one or two arguments.
The first argument is a regular expression; if the calling function's
name is matched by this argument, this function returns True.
The optional second argument tells this function how many stack frames
to traverse to find the calling function.  The default is 1.cCstt|�jd�dS(Ntcaller_matches(RRR(R((s//usr/share/gdb/python/gdb/function/caller_is.pyR/sicCsWtj�}x&|dkr4|j�}|d}qWtj|j�|j��dk	S(Nii(RRRtretmatchR	RtNone(RRR
R((s//usr/share/gdb/python/gdb/function/caller_is.pyR2s
(R
RRRR(((s//usr/share/gdb/python/gdb/function/caller_is.pyR's	(RRtFunctionRR(((s//usr/share/gdb/python/gdb/function/caller_is.pyt<module>s