Current File : //usr/share/gdb/python/gdb/function/__pycache__/caller_is.cpython-39.opt-1.pyc
a

ɱZhU�@stddlZddlZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd	�d	ej�Ze�e�e�e�dS)
�Ncs*eZdZdZ�fdd�Zddd�Z�ZS)�CallerIsa�Check the calling function's name.

    Usage: $_caller_is (NAME [, NUMBER-OF-FRAMES])

    Arguments:

      NAME: The name of the function to search for.

      NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
        selected frame to compare with.  If the value is greater than the depth of
        the stack from that point then the result is False.
        The default is 1.

    Returns:
      True if the function's name at the specified frame is equal to NAME.cstt|��d�dS)NZ
_caller_is)�superr�__init__��self��	__class__��//usr/share/gdb/python/gdb/function/caller_is.pyr&szCallerIs.__init__�cCsN|dkrtd��t��}|dkr>|��}|dur4dS|d}q|��|��kS�Nr�nframes must be >= 0Fr)�
ValueError�gdb�selected_frame�older�name�string�rr�nframes�framer	r	r
�invoke)s
zCallerIs.invoke)r��__name__�
__module__�__qualname__�__doc__rr�
__classcell__r	r	rr
rsrcs*eZdZdZ�fdd�Zddd�Z�ZS)�
CallerMatchesaCompare the calling function's name with a regexp.

    Usage: $_caller_matches (REGEX [, NUMBER-OF-FRAMES])

    Arguments:

      REGEX: The regular expression to compare the function's name with.

      NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
        selected frame to compare with.  If the value is greater than the depth of
        the stack from that point then the result is False.
        The default is 1.

    Returns:
      True if the function's name at the specified frame matches REGEX.cstt|��d�dS)NZ_caller_matches)rrrrrr	r
rFszCallerMatches.__init__rcCsV|dkrtd��t��}|dkr>|��}|dur4dS|d}qt�|��|���duSr)rrrr�re�matchrrrr	r	r
rIs
zCallerMatches.invoke)rrr	r	rr
r5srcs*eZdZdZ�fdd�Zddd�Z�ZS)�AnyCallerIsa�Check all calling function's names.

    Usage: $_any_caller_is (NAME [, NUMBER-OF-FRAMES])

    Arguments:

      NAME: The name of the function to search for.

      NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
        selected frame to compare with.  If the value is greater than the depth of
        the stack from that point then the result is False.
        The default is 1.

    Returns:
      True if any function's name is equal to NAME.cstt|��d�dS)NZ_any_caller_is)rr!rrrr	r
rfszAnyCallerIs.__init__rcCsV|dkrtd��t��}|dkrR|��|��kr4dS|��}|durHdS|d}qdS�Nrr
TFr)rrrrrrrr	r	r
ris
zAnyCallerIs.invoke)rrr	r	rr
r!Usr!cs*eZdZdZ�fdd�Zddd�Z�ZS)�AnyCallerMatchesaCompare all calling function's names with a regexp.

    Usage: $_any_caller_matches (REGEX [, NUMBER-OF-FRAMES])

    Arguments:

      REGEX: The regular expression to compare the function's name with.

      NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
        selected frame to compare with.  If the value is greater than the depth of
        the stack from that point then the result is False.
        The default is 1.

    Returns:
      True if any function's name matches REGEX.cstt|��d�dS)NZ_any_caller_matches)rr#rrrr	r
r�szAnyCallerMatches.__init__rcCsf|dkrtd��t��}t�|���}|dkrb|�|���durDdS|��}|durXdS|d}q&dSr")	rrrr�compilerr rr)rrrrZname_rer	r	r
r�s
zAnyCallerMatches.invoke)rrr	r	rr
r#wsr#)rrZFunctionrrr!r#r	r	r	r
�<module>s  "#