| 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 : |
U
Z�>^%8 � @ s� d Z ddlZddlZddlZdd� Zdd� ZG dd� dej�Zd d
� Zdd� Z ddd�Z
dd� Zdd� Zdd� Z
G dd� dej�ZG dd� dej�Zdd� Ze� dS )z.GDB commands for working with pretty-printers.� Nc
C s t �| �}t|�}d}d}d}|dkr.td��|dkr>|d }|dkrr|d �dd�}|d }t|�dkrr|d }zt�|�}W n tk
r� td | ��Y nX zt�|�}W n tk
r� td
| ��Y nX |dk �rzt�|�} W n" tk
�r td| ��Y nX nd} ||| 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_regexpZname_subname� object_re�name_re�
subname_re� r �4/usr/share/gdb/python/gdb/command/pretty_printers.py�parse_printer_regexps s:
r c C s t | d�r| jS dS dS )z>Internal utility to see if printer (or subprinter) is enabled.�enabledTN)�hasattrr ��printerr r r �printer_enabled_pL s
r c sP e Zd ZdZ� fdd�Zedd� �Zedd� �Zdd � Zd
d� Z dd
� 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.c s t t| ��dtj� d S )Nzinfo pretty-printer)�superr �__init__r �COMMAND_DATA��self�� __class__r r r a s �zInfoPrettyPrinter.__init__c C s t | �rdS dS dS )z9Return "" if PRINTER is enabled, otherwise " [disabled]".r z [disabled]N)r r r r r �enabled_stringe s z InfoPrettyPrinter.enabled_stringc C s$ t | d�r| jS t | d�r | jS dS )zReturn the printer's name.�name�__name__�unknown)r r&