403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/gdb/python/gdb/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/gdb/python/gdb/command/__pycache__/pretty_printers.cpython-38.pyc
U

Z�>^%8�@s�dZddlZddlZddlZdd�Zdd�ZGdd�dej�Zd	d
�Zdd�Z	ddd�Z
dd�Zdd�Zdd�Z
Gdd�dej�ZGdd�dej�Zdd�Ze�dS)z.GDB commands for working with pretty-printers.�Nc
Cst�|�}t|�}d}d}d}|dkr.td��|dkr>|d}|dkrr|d�dd�}|d}t|�dkrr|d}zt�|�}Wn tk
r�td	|��YnXzt�|�}Wn tk
r�td
|��YnX|dk	�rzt�|�}	Wn"tk
�rtd|��YnXnd}	|||	fS)a�Internal utility to parse a pretty-printer command argv.

    Arguments:
        arg: The arguments to the command.  The format is:
             [object-regexp [name-regexp]].
             Individual printers in a collection are named as
             printer-name;subprinter-name.

    Returns:
        The result is a 3-tuple of compiled regular expressions, except that
        the resulting compiled subprinter regexp is None if not provided.

    Raises:
        SyntaxError: an error processing ARG
    �N�ztoo many arguments�r��;zinvalid object regexp: %szinvalid name regexp: %szinvalid subname regexp: %s)�gdb�string_to_argv�len�SyntaxError�split�re�compile)
�arg�argv�argcZ
object_regexp�name_regexpZsubname_regexpZname_subname�	object_re�name_re�
subname_re�r�4/usr/share/gdb/python/gdb/command/pretty_printers.py�parse_printer_regexpss:

rcCst|d�r|jSdSdS)z>Internal utility to see if printer (or subprinter) is enabled.�enabledTN)�hasattrr��printerrrr�printer_enabled_pLs
rcsPeZdZdZ�fdd�Zedd��Zedd��Zdd	�Zd
d�Z	dd
�Z
�ZS)�InfoPrettyPrintera�GDB command to list all registered pretty-printers.

Usage: info pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]

OBJECT-REGEXP is a regular expression matching the objects to list.
Objects are "global", the program space's file, and the objfiles within
that program space.

NAME-REGEXP matches the name of the pretty-printer.
Individual printers in a collection are named as
printer-name;subprinter-name.cstt|��dtj�dS)Nzinfo pretty-printer)�superr�__init__r�COMMAND_DATA��self��	__class__rrras�zInfoPrettyPrinter.__init__cCst|�rdSdSdS)z9Return "" if PRINTER is enabled, otherwise " [disabled]".rz [disabled]N)rrrrr�enabled_stringesz InfoPrettyPrinter.enabled_stringcCs$t|d�r|jSt|d�r |jSdS)zReturn the printer's name.�name�__name__�unknown)rr&r'rrrr�printer_namems


zInfoPrettyPrinter.printer_namec
Cs�tt�|�|jd�}|D]�}|�|�}|�|�}|�|�rtd||f�t|d�r|jdk	rtt�|j�|jd�}|D],}	|r�|�|	j�rxtd|	j|�|	�f�qxqdS)z Print a list of pretty-printers.)�keyz  %s%s�subprintersNz    %s%s)	�sorted�copyr)r%�match�printrr+r&)
r"�pretty_printersrrZsorted_pretty_printersrr&rZsorted_subprinters�
subprinterrrr�list_pretty_printerszs.
�



��
���z&InfoPrettyPrinter.list_pretty_printerscCs(|r$|�|�r$t|�|�|||�dS)z$Subroutine of invoke to simplify it.N)r.r/r2)r"�title�printer_listZobj_name_to_matchrrrrrr�invoke1�szInfoPrettyPrinter.invoke1c	Csxt|�\}}}|�dtjd|||�t��}|�d|j|jd|||�t��D]"}|�d|j|j|j|||�qPdS)�&GDB calls this to perform the command.zglobal pretty-printers:�globalzprogspace %s pretty-printers:�	progspacezobjfile %s pretty-printers:N)rr5rr0�current_progspace�filename�objfiles)r"r�from_ttyrrr�cp�objfilerrr�invoke�s.
���zInfoPrettyPrinter.invoke)r'�
__module__�__qualname__�__doc__r�staticmethodr%r)r2r5r?�
__classcell__rrr#rrTs

rcCszd}d}|D]d}t|d�rX|jdk	rXt|�rH|jD]}t|�r2|d7}q2|t|j�7}qt|�rh|d7}|d7}q||fS)z9Return a 2-tuple of number of enabled and total printers.rr+Nr)rr+rr	)r0r�totalrr1rrr�count_enabled_printers�s
�


rFcCs|d}d}ttj�\}}||7}||7}tt��j�\}}||7}||7}t��D]"}t|j�\}}||7}||7}qP||fS)zkReturn a 2-tuble of the enabled state and total number of all printers.
    This includes subprinters.
    r)rFrr0r9r;)�
enabled_count�total_countZ	t_enabledZt_totalr>rrr�count_all_enabled_printers�s
rI�scCs|dkrd||fS|SdS)z!Return TEXT pluralized if N != 1.rz%s%sNr)�text�n�suffixrrr�	pluralize�srNcCst�\}}td||f�dS)zZPrint the number of printers enabled/disabled.
    We count subprinters individually.
    z%d of %d printers enabledN)rIr/)rGrHrrr�#show_pretty_printer_enabled_summary�s
rOcCs�d}|D]�}t|d�r"|�|j�s8t|d�r|�|j�rt|d�r�|jdk	r�|s�t|�|krx|jD]}t|�rb|d7}qb||_q�|jD]2}|�|j�r�t|�r�t|�|kr�|d7}||_q�q|st|�|kr�|d7}||_q|S)a�Worker for enabling/disabling pretty-printers.

    Arguments:
        pretty_printers: list of pretty-printers
        name_re: regular-expression object to select printers
        subname_re: regular expression object to select subprinters or None
                    if all are affected
        flag: True for Enable, False for Disable

    Returns:
        The number of printers affected.
        This is just for informational purposes for the user.
    rr&r'r+Nr)rr.r&r'r+rr)r0rr�flagrErr1rrr�do_enable_pretty_printer_1�s8�
�
�



�
rQc	Cs�t|�\}}}d}|�d�r0|ttj|||�7}t��}|�d�rV|t|j|||�7}t��D]$}|�|j�r^|t|j|||�7}q^|r�d}nd}td|t	d|�|f�t
�dS)	z7Internal worker for enabling/disabling pretty-printers.rr7r8r�disabledz%d %s %srN)rr.rQrr0r9r;r:r/rNrO)	rrPrrrrEr=r>�staterrr�do_enable_pretty_printers6
�
��rTcs(eZdZdZ�fdd�Zdd�Z�ZS)�EnablePrettyPrintera�GDB command to enable the specified pretty-printer.

Usage: enable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]

OBJECT-REGEXP is a regular expression matching the objects to examine.
Objects are "global", the program space's file, and the objfiles within
that program space.

NAME-REGEXP matches the name of the pretty-printer.
Individual printers in a collection are named as
printer-name;subprinter-name.cstt|��dtj�dS)Nzenable pretty-printer)rrUrrr r!r#rrrHs�zEnablePrettyPrinter.__init__cCst|d�dS)r6TN�rT�r"rr<rrrr?LszEnablePrettyPrinter.invoke�r'r@rArBrr?rDrrr#rrU;srUcs(eZdZdZ�fdd�Zdd�Z�ZS)�DisablePrettyPrintera�GDB command to disable the specified pretty-printer.

Usage: disable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]

OBJECT-REGEXP is a regular expression matching the objects to examine.
Objects are "global", the program space's file, and the objfiles within
that program space.

NAME-REGEXP matches the name of the pretty-printer.
Individual printers in a collection are named as
printer-name;subprinter-name.cstt|��dtj�dS)Nzdisable pretty-printer)rrYrrr r!r#rrr^s�zDisablePrettyPrinter.__init__cCst|d�dS)r6FNrVrWrrrr?bszDisablePrettyPrinter.invokerXrrr#rrYQsrYcCst�t�t�dS)zDCall from a top level script to install the pretty-printer commands.N)rrUrYrrrr� register_pretty_printer_commandsgsrZ)rJ)rBr-rrrr�CommandrrFrIrNrOrQrTrUrYrZrrrr�<module>s 4R
:%

Youez - 2016 - github.com/yon3zu
LinuXploit