Current File : //proc/thread-self/root/kunden/usr/share/gdb/python/gdb/__pycache__/frames.cpython-39.pyc |
a
ɱZh�$ � @ s� d Z ddlZddlmZ ddlmZmZ ddlZddlZdd� Z dd� Z
d d
� Zdd� Zd
d� Z
dd� Zdd� Zdd� Zdd� ZdS )z2Internal functions for working with frame-filters.� N)�
FrameIterator)�FrameDecorator�DAPFrameDecoratorc C s t | dd�S )aB Internal worker function to return the frame-filter's priority
from a frame filter object. This is a fail free function as it is
used in sorting and filtering. If a badly implemented frame
filter does not implement the priority attribute, return zero
(otherwise sorting/filtering will fail and prevent other frame
filters from executing).
Arguments:
filter_item: An object conforming to the frame filter
interface.
Returns:
The priority of the frame filter from the "priority"
attribute, or zero.
�priorityr ��getattr��filter_item� r
�#/usr/share/gdb/python/gdb/frames.py�get_priority s r c C s
|| _ dS )z�Internal worker function to set the frame-filter's priority.
Arguments:
filter_item: An object conforming to the frame filter
interface.
priority: The priority to assign as an integer.
N)r )r r r
r
r �set_priority/ s r
c C s t | dd�S )aD Internal worker function to return a filter's enabled state
from a frame filter object. This is a fail free function as it is
used in sorting and filtering. If a badly implemented frame
filter does not implement the enabled attribute, return False
(otherwise sorting/filtering will fail and prevent other frame
filters from executing).
Arguments:
filter_item: An object conforming to the frame filter
interface.
Returns:
The enabled state of the frame filter from the "enabled"
attribute, or False.
�enabledFr r r
r
r �get_enabled; s r c C s
|| _ dS )z�Internal Worker function to set the frame-filter's enabled
state.
Arguments:
filter_item: An object conforming to the frame filter
interface.
state: True or False, depending on desired state.
N)r )r �stater
r
r �set_enabledR s
r c C s� | dkrPt j�� }t �� j�� }t�||�}t �� D ]}t�||j�� �}q4|S | dkr^t jS | dkrtt �� }|jS t �� D ]}| |jkr||j S q|d| d }t �|��dS )a Internal Worker function to return the frame filter
dictionary, depending on the name supplied as an argument. If the
name is not "all", "global" or "progspace", it is assumed to name
an object-file.
Arguments:
name: The name of the list, as specified by GDB user commands.
Returns:
A dictionary object for a single specified dictionary, or a
list containing all the items for "all"
Raises:
gdb.GdbError: A dictionary of that name cannot be found.
�all�globalZ progspacez)Cannot find frame-filter dictionary for '�'N) �gdbZ
frame_filters�valuesZcurrent_progspace� itertools�chainZobjfiles�filenameZGdbError)�name�glob�progZreturn_iterZobjfileZcp�msgr
r
r �return_list_ s"