|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/share/gdb/python/gdb/command/ |
Upload File : |
�
�� Rc @ s^ d Z d d l Z d d l Z d d l m Z d d l m Z d d l Z d d l Z d e j f d � � YZ
d e j f d � � YZ d e j f d
� � YZ d � Z
d � Z d
� Z d � Z d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ e
� e � e � e � e � e � e � d S( s, GDB commands for working with frame-filters.i����N( t
FrameIterator( t FrameDecoratort SetFilterPrefixCmdc B s e Z d Z d � Z RS( s9 Prefix command for 'set' frame-filter related operations.c C s) t t | � j d t j t j t � d S( Ns set frame-filter( t superR t __init__t gdbt COMMAND_OBSCUREt
COMPLETE_NONEt True( t self( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR s ( t __name__t
__module__t __doc__R ( ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR s t ShowFilterPrefixCmdc B s e Z d Z d � Z RS( s: Prefix command for 'show' frame-filter related operations.c C s) t t | � j d t j t j t � d S( Ns show frame-filter( R R
R R R R R ( R ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR % s ( R
R R R ( ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR
# s t InfoFrameFilterc B sA e Z d Z d � Z e d � � Z d � Z d � Z d � Z RS( sM List all registered Python frame-filters.
Usage: info frame-filters
c C s t t | � j d t j � d S( Ns info frame-filter( R R R R t COMMAND_DATA( R ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR / s c C s | r
d Sd Sd S( s2 Return "Yes" if filter is enabled, otherwise "No".t Yest NoN( ( t state( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt enabled_string2 s c C s� t | j � d d � d t �} t | � d k r; d GHn� d GHx� | D]� } | d } yQ d j t t j j | d � � � } d j | j t j j
| d � � � } Wn* t k
r� } d
| d t | � GHqG Xd | | | f GHqG Wd
S( s� Internal worker function to list and print frame filters
in a dictionary.
Arguments:
frame_filters: The name of the dictionary, as
specified by GDB user commands.
t keyc S s t j j | d � S( Ni ( R t framest get_priority( t i( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt <lambda>D s t reversei s No frame filters registered.s Priority Enabled Names {:<8}i s {:<7}s Error printing filter 's ': s %s %s %sN( t sortedt itemsR t lent formatt strR R R R t get_enabledt Exception( R t
frame_filterst sorted_frame_filterst frame_filtert namet priorityt enabledt e( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt list_frame_filters: s
&c C s$ | GH| j | � | r d GHn d S( Nt ( R( ( R t titlet filter_listt
blank_line( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt
print_listW s
c C sw | j d t j t � t j � } | j d | j | j t � x1 t j � D]# } | j d | j | j t � qL Wd S( Ns global frame-filters:s progspace %s frame-filters:s objfile %s frame-filters:( R- R R! R t current_progspacet filenamet objfilest False( R t argt from_ttyt cpt objfile( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt invoke] s
( R
R R R t staticmethodR R( R- R6 ( ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR ) s c C s� t j | � } t | � } | d d k rM | d k rM t j | d � � n2 | d d k r | d k r t j | d � � n | S( sa Internal worker function to take an argument from
enable/disable and return a tuple of arguments.
Arguments:
cmd_name: Name of the command invoking this function.
args: The argument as a string.
Returns:
A tuple containing the dictionary, and the argument, or just
the dictionary in the case of "all".
i t alli s* : with 'all' you may not specify a filter.i s takes exactly two arguments.( R t string_to_argvR t GdbError( t cmd_nameR2 t argvt argc( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt _enable_parse_argj s
c C s� | d } t j j | � } | d k rO x� | D] } t j j | | � q/ Wnb | d } y | | } Wn4 t k
r� d t t � d } t j | � � n Xt j j | | � d S( s# Worker for enabling/disabling frame_filters.
Arguments:
command_type: A tuple with the first element being the
frame filter dictionary, and the second being
the frame filter name.
flag: True for Enable, False for Disable.
i R8 i s frame-filter 's ' not found.N( R R t return_listt set_enabledt KeyErrorR R$ R: ( t
command_tuplet flagt list_opt op_listt itemR# t fft msg( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt _do_enable_frame_filter� s
c C s� | t k r d d d g } n d d g } x$ t j � D] } | j | j � q7 W| d k ra | St | d � | � } t | � d k r� | d t | � t | � | d <n | S( s� Worker for frame filter dictionary name completion.
Arguments:
text: The full text of the command line.
word: The most recent word of the command line.
all_flag: Whether to include the word "all" in completion.
Returns:
A list of suggested frame filter dictionary name completions
from text/word analysis. This list can be empty when there
are no suggestions for completion.
R8 t globalt progspaceR) c S s
| j | � S( N( t
startswith( t xt y( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR � s i i ( R R R0 t appendR/ t filterR ( t textt wordt all_flagt filter_locationsR5 t flist( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt _complete_frame_filter_list� s
%c C s5 | j � } | d k r | St | d � | � } | S( s� Worker for frame filter name completion.
Arguments:
word: The most recent word of the command line.
printer_dict: The frame filter dictionary to search for frame
filter name completions.
Returns: A list of suggested frame filter name completions
from word analysis of the frame filter dictionary. This list
can be empty when there are no suggestions for completion.
R) c S s
| j | � S( N( RL ( RM RN ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR � s ( t keysRP ( RR t printer_dictt printer_keysRU ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt _complete_frame_filter_name� s
t EnableFrameFilterc B s) e Z d Z d � Z d � Z d � Z RS( s� GDB command to disable the specified frame-filter.
Usage: enable frame-filter enable DICTIONARY [NAME]
DICTIONARY is the name of the frame filter dictionary on which to
operate. If dictionary is set to "all", perform operations on all
dictionaries. Named dictionaries are: "global" for the global
frame filter dictionary, "progspace" for the program space's frame
filter dictionary. If either all, or the two named dictionaries
are not specified, the dictionary name is assumed to be the name
of the object-file name.
NAME matches the name of the frame-filter to operate on. If
DICTIONARY is "all", NAME is ignored.
c C s t t | � j d t j � d S( Ns enable frame-filter( R R[ R R R ( R ( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyR � s c C sX | j d � d k r% t | | t � St j j | j � d j � � } t | | � Sd S( sT Completion function for both frame filter dictionary, and
frame filter name.t i N( t countRV R R R R? t splitt rstripRZ ( R RQ RR t printer_list( ( s2 /usr/share/gdb/python/gdb/command/frame_filters.pyt complete� s "c C s t d | � } t | t � d S( Ns enable frame-filter( R>