HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/gdb/python/gdb/__pycache__/FrameDecorator.cpython-310.pyc
o

��nb�(�@s\ddlZzeWneyeZYnwGdd�de�ZGdd�de�ZGdd�de�ZdS)�Nc@sfeZdZdZ	dd�Zedd��Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)�FrameDecoratorz)Basic implementation of a Frame DecoratorcCs
||_dS�N)�_base)�self�base�r�+/usr/share/gdb/python/gdb/FrameDecorator.py�__init__=s
zFrameDecorator.__init__cCs:|��}|jr|jjr|��tjks|��tjkrdSdS)zIInternal utility to determine if the frame is special or
        limited.TF)�find_sal�symtab�filename�type�gdb�DUMMY_FRAME�SIGTRAMP_FRAME)�frame�salrrr�_is_limited_frame@s��z FrameDecorator._is_limited_framecCst|jd�r|j��SdS)zLReturn any elided frames that this class might be
        wrapping, or None.�elidedN)�hasattrrr�rrrrrQs
zFrameDecorator.elidedcCstt|jtj�st|jd�r|j��S|��}|��tjkrdS|��tj	kr(dS|��}|dur6|�
�}|St|�S)a�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).�functionz<function called from gdb>z<signal handler called>N)�
isinstancerr�Framerr�inferior_framer
rr�pc�str)rr�funcrrrrrYs
zFrameDecorator.functioncCs&t|jd�r|j��S|��}|��S)z$Return the address of the frame's pc�address)rrrrr�rrrrrr~s
zFrameDecorator.addresscCsNt|jd�r|j��S|��}|��}|jr|jjs#|��}t�|�S|jjS)z�Return the filename associated with this frame, detecting
        and returning the appropriate library name is this is a shared
        library.r)	rrrrr
rrr�
solib_name)rrrrrrrr�s

zFrameDecorator.filenamecC�<t|jd�r|j��S|��}|�|�rdSt|�}|��S)aReturn 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.�
frame_argsN)rrr"rr�	FrameVars�fetch_frame_args�rr�argsrrrr"��

zFrameDecorator.frame_argscCr!)aReturn 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.�frame_localsN)rrr(rrr#�fetch_frame_localsr%rrrr(�r'zFrameDecorator.frame_localscCsBt|jd�r|j��S|��}|�|�rdS|��}|r|jSdS)z�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 None�lineN)rrr*rrr
)rrrrrrr*�s

zFrameDecorator.linecCst|jd�r|j��S|jS)z7Return the gdb.Frame underpinning this frame decorator.r)rrrrrrrr�s
zFrameDecorator.inferior_frameN)�__name__�
__module__�__qualname__�__doc__r	�staticmethodrrrrrr"r(r*rrrrrrs
%	rc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�SymValueWrapperzkA container class conforming to the Symbol/Value interface
    which holds frame locals or frame arguments.cCs||_||_dSr)�sym�val)r�symbol�valuerrrr	�s
zSymValueWrapper.__init__cC�|jS)z5Return the value associated with this symbol, or None)r2rrrrr4�szSymValueWrapper.valuecCr5)zOReturn the symbol, or Python text, associated with this
        symbol, or None)r1rrrrr3�szSymValueWrapper.symbolN)r+r,r-r.r	r4r3rrrrr0�s
r0c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r#zOUtility class to fetch and store frame local variables, or
    frame arguments.cCs:||_tjdtjdtjdtjdtjdtjdtjdi|_	dS)NT)
rr�SYMBOL_LOC_STATIC�SYMBOL_LOC_REGISTER�SYMBOL_LOC_ARG�SYMBOL_LOC_REF_ARG�SYMBOL_LOC_LOCAL�SYMBOL_LOC_REGPARM_ADDR�SYMBOL_LOC_COMPUTED�symbol_classrrrrr	�s
�zFrameVars.__init__cCs"t|t�rdS|j}|j�|d�S)z�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.TF)r�
basestring�
addr_classr=�get)rr1�sym_typerrr�fetch_b�s
	zFrameVars.fetch_bcCs�g}z|j��}Wntyd}Ynw|dur?|js|jr"	|S|D]}|jr*q$|�|�r7|�t|d��q$|j	}|dus|S)z�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)
r�block�RuntimeError�	is_global�	is_static�is_argumentrB�appendr0�
superblock)r�lvarsrCr1rrrr)s&�	�
��zFrameVars.fetch_frame_localscCszg}z|j��}Wntyd}Ynw|dur&|jdurn|j}|dus|dur;|D]}|js2q,|�t|d��q,|S)z�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)rrCrDrrIrGrHr0)rr&rCr1rrrr$s"�
�zFrameVars.fetch_frame_argsN)r+r,r-r.r	rBr)r$rrrrr#�sr#)rr>�	NameErrorr�objectrr0r#rrrr�<module>s�8