Prv8 Shell
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 :  /proc/17567/root/usr/share/gdb/python/gdb/command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/17567/root/usr/share/gdb/python/gdb/command/frame_filters.pyo
�
�� Rc@s^dZddlZddlZddlmZddlmZddlZddlZdej	fd��YZ
dej	fd��YZd	ej	fd
��YZd�Z
d�Zd
�Zd�Zdej	fd��YZdej	fd��YZdej	fd��YZdej	fd��YZe
�e�e�e�e�e�e�dS(s,GDB commands for working with frame-filters.i����N(t
FrameIterator(tFrameDecoratortSetFilterPrefixCmdcBseZdZd�ZRS(s9Prefix command for 'set' frame-filter related operations.cCs)tt|�jdtjtjt�dS(Nsset frame-filter(tsuperRt__init__tgdbtCOMMAND_OBSCUREt
COMPLETE_NONEtTrue(tself((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRs(t__name__t
__module__t__doc__R(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRstShowFilterPrefixCmdcBseZdZd�ZRS(s:Prefix command for 'show' frame-filter related operations.cCs)tt|�jdtjtjt�dS(Nsshow frame-filter(RR
RRRRR(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR%s(R
RRR(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR
#stInfoFrameFiltercBsAeZdZd�Zed��Zd�Zd�Zd�ZRS(sMList all registered Python frame-filters.

    Usage: info frame-filters
    cCs tt|�jdtj�dS(Nsinfo frame-filter(RRRRtCOMMAND_DATA(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR/scCs|r
dSdSdS(s2Return "Yes" if filter is enabled, otherwise "No".tYestNoN((tstate((s2/usr/share/gdb/python/gdb/command/frame_filters.pytenabled_string2scCs�t|j�dd�dt�}t|�dkr;dGHn�dGHx�|D]�}|d}yQdjttjj|d���}d	j|j	tjj
|d���}Wn*tk
r�}d
|dt|�GHqGXd|||fGHqGWd
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.
        tkeycSstjj|d�S(Ni(Rtframestget_priority(ti((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt<lambda>Dstreverseis  No frame filters registered.s  Priority  Enabled  Names{:<8}is{:<7}s  Error printing filter 's': s  %s  %s  %sN(tsortedtitemsRtlentformattstrRRRRtget_enabledt	Exception(R	t
frame_filterstsorted_frame_filterstframe_filtertnametprioritytenabledte((s2/usr/share/gdb/python/gdb/command/frame_filters.pytlist_frame_filters:s 			

&cCs$|GH|j|�|r dGHndS(Nt(R((R	ttitletfilter_listt
blank_line((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt
print_listWs
cCsw|jdtjt�tj�}|jd|j|jt�x1tj�D]#}|jd|j|jt�qLWdS(Nsglobal frame-filters:sprogspace %s frame-filters:sobjfile %s frame-filters:(R-RR!Rtcurrent_progspacetfilenametobjfilestFalse(R	targtfrom_ttytcptobjfile((s2/usr/share/gdb/python/gdb/command/frame_filters.pytinvoke]s
(	R
RRRtstaticmethodRR(R-R6(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR)s			cCs�tj|�}t|�}|ddkrM|dkrMtj|d��n2|ddkr|dkrtj|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".
    itallis*: with 'all' you may not specify a filter.is takes exactly two arguments.(Rtstring_to_argvRtGdbError(tcmd_nameR2targvtargc((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_enable_parse_argjs
cCs�|d}tjj|�}|dkrOx�|D]}tjj||�q/Wnb|d}y||}Wn4tk
r�dtt�d}tj|��nXtjj||�dS(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.
    iR8isframe-filter 's' not found.N(RRtreturn_listtset_enabledtKeyErrorRR$R:(t
command_tupletflagtlist_optop_listtitemR#tfftmsg((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_do_enable_frame_filter�s




cCs�|tkrdddg}nddg}x$tj�D]}|j|j�q7W|dkra|St|d�|�}t|�dkr�|dt|�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.
        R8tglobalt	progspaceR)cSs
|j|�S(N(t
startswith(txty((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR�sii(RRR0tappendR/tfilterR(ttexttwordtall_flagtfilter_locationsR5tflist((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_complete_frame_filter_list�s
%cCs5|j�}|dkr|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)cSs
|j|�S(N(RL(RMRN((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR�s(tkeysRP(RRtprinter_dicttprinter_keysRU((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_complete_frame_filter_name�s
tEnableFrameFiltercBs)eZdZd�Zd�Zd�ZRS(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.
    cCs tt|�jdtj�dS(Nsenable frame-filter(RR[RRR(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR�scCsX|jd�dkr%t||t�Stjj|j�dj��}t||�SdS(sTCompletion function for both frame filter dictionary, and
        frame filter name.t iN(	tcountRVRRRR?tsplittrstripRZ(R	RQRRtprinter_list((s2/usr/share/gdb/python/gdb/command/frame_filters.pytcomplete�s"cCs td|�}t|t�dS(Nsenable frame-filter(R>RIR(R	R2R3RB((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR6�s(R
RRRRaR6(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR[�s			tDisableFrameFiltercBs)eZdZd�Zd�Zd�ZRS(s�GDB command to disable the specified frame-filter.

    Usage: disable frame-filter disable 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.
    cCs tt|�jdtj�dS(Nsdisable frame-filter(RRbRRR(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRscCsX|jd�dkr%t||t�Stjj|j�dj��}t||�SdS(sTCompletion function for both frame filter dictionary, and
        frame filter name.R\iN(	R]RVRRRR?R^R_RZ(R	RQRRR`((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRas"cCs td|�}t|t�dS(Nsdisable frame-filter(R>RIR1(R	R2R3RB((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR6s(R
RRRRaR6(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRb�s			tSetFrameFilterPrioritycBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(slGDB command to set the priority of the specified frame-filter.

    Usage: set frame-filter priority DICTIONARY NAME PRIORITY

    DICTIONARY is the name of the frame filter dictionary on which to
    operate.  Named dictionaries are: "global" for the global frame
    filter dictionary, "progspace" for the program space's framefilter
    dictionary.  If either of these two 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.

    PRIORITY is the an integer to assign the new priority to the frame
    filter.
    cCs tt|�jdtj�dS(Nsset frame-filter priority(RRcRRR(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR*scCs4tj|�}t|�}|dkr0dGHdS|S(sRInternal worker to parse a priority from a tuple.

        Arguments:
            arg: Tuple which contains the arguments from the command.

        Returns:
            A tuple containing the dictionary, name and priority from
            the arguments.

        Raises:
            gdb.GdbError: An error parsing the arguments.
        is8set frame-filter priority takes exactly three arguments.N(RR9RtNone(R	R2R<R=((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_parse_pri_arg/scCs�|d}|d}|d}tjj|�}y||}Wn4tk
rtdtt�d}tj|��nXtjj||�dS(sInternal worker for setting priority of frame-filters, by
        parsing a tuple and calling _set_priority with the parsed
        tuple.

        Arguments:
            command_tuple: Tuple which contains the arguments from the
                           command.
        iiisframe-filter 's' not found.N(RRR?RARR$R:tset_priority(R	RBRDR#R%RERGRH((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt_set_filter_priorityFs




cCsX|jd�dkr%t||t�Stjj|j�dj��}t||�SdS(sTCompletion function for both frame filter dictionary, and
        frame filter name.R\iN(	R]RVR1RRR?R^R_RZ(R	RQRRR`((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRa^s"cCs/|j|�}|dkr+|j|�ndS(N(ReRdRg(R	R2R3RB((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR6gs(R
RRRReRgRaR6(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRcs					tShowFrameFilterPrioritycBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sGDB command to show the priority of the specified frame-filter.

    Usage: show frame-filter priority DICTIONARY NAME

    DICTIONARY is the name of the frame filter dictionary on which to
    operate.  Named dictionaries are: "global" for the global frame
    filter dictionary, "progspace" for the program space's framefilter
    dictionary.  If either of these two 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.
    cCs tt|�jdtj�dS(Nsshow frame-filter priority(RRhRRR(R	((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRzscCs4tj|�}t|�}|dkr0dGHdS|S(sKInternal worker to parse a dictionary and name from a
        tuple.

        Arguments:
            arg: Tuple which contains the arguments from the command.

        Returns:
            A tuple containing the dictionary,  and frame filter name.

        Raises:
            gdb.GdbError: An error parsing the arguments.
        is7show frame-filter priority takes exactly two arguments.N(RR9RRd(R	R2R<R=((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRescCsgtjj|�}y||}Wn4tk
rVdt|�d}tj|��nXtjj|�S(sEWorker for retrieving the priority of frame_filters.

        Arguments:
            frame_filters: Name of frame filter dictionary.
            name: object to select printers.

        Returns:
            The priority of the frame filter.

        Raises:
            gdb.GdbError: A frame filter cannot be found.
        sframe-filter 's' not found.(RRR?RARR:R(R	R!R$RERGRH((s2/usr/share/gdb/python/gdb/command/frame_filters.pytget_filter_priority�s
cCsU|jd�dkr%t||t�Stj|j�dj��}t||�SdS(sTCompletion function for both frame filter dictionary, and
        frame filter name.R\iN(R]RVR1tframet_return_listR^R_RZ(R	RQRRR`((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRa�scCs�|j|�}|dkrdS|d}|d}y|j||�}Wn*tk
ru}dtdt|�GHn Xd|d|dt|�GHdS(Niis$Error printing filter priority for 's':sPriority of filter 's' in list 's' is: (ReRdRiR R$R(R	R2R3RBtfilter_namet	list_nameR%R'((s2/usr/share/gdb/python/gdb/command/frame_filters.pyR6�s

(R
RRRReRiRaR6(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyRhls				
(RRtcopytgdb.FrameIteratorRtgdb.FrameDecoratorRt
gdb.framest	itertoolstCommandRR
RR>RIRVRZR[RbRcRh(((s2/usr/share/gdb/python/gdb/command/frame_filters.pyt<module>s0A			%	!!S[

haha - 2025