HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/gdb/python/gdb/command/__pycache__/unwinders.cpython-310.pyc
o

̴6b�@sxddlZddlZdd�Zdd�ZGdd�dej�Zdd	�Zd
d�ZGdd
�d
ej�ZGdd�dej�Z	dd�Z
e
�dS)�NcCs,zt�|�WStytd||f��w)NzInvalid %s regexp: %s.)�re�compile�SyntaxError)�exp�idstring�r�./usr/share/gdb/python/gdb/command/unwinders.py�validate_regexps
�r	cCs^t�|�}t|�}|dkrtd��d}d}|dkr%|d}|dkr%|d}t|d�t|d�fS)a$Internal utility to parse unwinder command argv.

    Arguments:
        arg: The arguments to the command. The format is:
             [locus-regexp [name-regexp]]

    Returns:
        A 2-tuple of compiled regular expressions.

    Raises:
        SyntaxError: an error processing ARG
    �zToo many arguments.��r�locus�unwinder)�gdb�string_to_argv�lenrr	)�arg�argv�argc�locus_regexp�name_regexprrr�parse_unwinder_command_argss
�rcs0eZdZdZ�fdd�Zdd�Zdd�Z�ZS)�InfoUnwindera6GDB command to list unwinders.

    Usage: info unwinder [LOCUS-REGEXP [NAME-REGEXP]]

    LOCUS-REGEXP is a regular expression matching the location of the
    unwinder.  If it is omitted, all registered unwinders from all
    loci are listed.  A locus can be 'global', 'progspace' to list
    the unwinders from the current progspace, or a regular expression
    matching filenames of objfiles.

    NAME-REGEXP is a regular expression to filter unwinder names.  If
    this omitted for a specified locus, then all registered unwinders
    in the locus are listed.c�tt|��dtj�dS)Nz
info unwinder)�superr�__init__r�
COMMAND_STACK��self��	__class__rrrI�zInfoUnwinder.__init__cCsF|sdSt|�|D]}|�|j�r td|j|jrdndf�q
dS)z�Lists the unwinders whose name matches regexp.

        Arguments:
            title: The line to print before the list.
            unwinders: The list of the unwinders.
            name_re: unwinder name filter.
        Nz  %s%srz [disabled])�print�match�name�enabled)r�title�	unwinders�name_rerrrr�list_unwindersLs����zInfoUnwinder.list_unwinderscCs�t|�\}}|�d�r|�dtj|�|�d�r't��}|�d|j|j|�t��D]}|�|j�r>|�d|j|j|�q+dS)N�globalzGlobal:�	progspacez
Progspace %s:zObjfile %s:)rr#r)r�frame_unwinders�current_progspace�filename�objfiles)rr�from_tty�locus_rer(�cp�objfilerrr�invoke^s

����zInfoUnwinder.invoke)�__name__�
__module__�__qualname__�__doc__rr)r4�
__classcell__rrrrr:s
rcCs,d}|D]}|�|j�r||_|d7}q|S)z�Enable/disable unwinders whose names match given regex.

    Arguments:
        unwinders: The list of unwinders.
        name_re: Unwinder name filter.
        flag: Enable/disable.

    Returns:
        The number of unwinders affected.
    rr)r#r$r%)r'r(�flag�totalrrrr�do_enable_unwinder1ns�r<cCs�t|�\}}d}|�d�r|ttj||�7}|�d�r&|tt��j||�7}t��D]}|�|j�r;|t|j||�7}q*|dkrDt��t	d||dkrMdnd|rRdnd	f�d
S)zEnable/disable unwinder(s).rr*r+z%d unwinder%s %srr�sr%�disabledN)
rr#r<rr,r-r/r.�invalidate_cached_framesr")rr:r1r(r;r3rrr�do_enable_unwinder�s&

����r@c�(eZdZdZ�fdd�Zdd�Z�ZS)�EnableUnwindera�GDB command to enable unwinders.

    Usage: enable unwinder [LOCUS-REGEXP [NAME-REGEXP]]

    LOCUS-REGEXP is a regular expression specifying the unwinders to
    enable.  It can 'global', 'progspace', or the name of an objfile
    within that progspace.

    NAME_REGEXP is a regular expression to filter unwinder names.  If
    this omitted for a specified locus, then all registered unwinders
    in the locus are affected.cr)Nzenable unwinder)rrBrrrrrrrr�r!zEnableUnwinder.__init__cC�t|d�dS)�&GDB calls this to perform the command.TN�r@�rrr0rrrr4��zEnableUnwinder.invoke�r5r6r7r8rr4r9rrrrrB��rBcrA)�DisableUnwindera�GDB command to disable the specified unwinder.

    Usage: disable unwinder [LOCUS-REGEXP [NAME-REGEXP]]

    LOCUS-REGEXP is a regular expression specifying the unwinders to
    disable.  It can 'global', 'progspace', or the name of an objfile
    within that progspace.

    NAME_REGEXP is a regular expression to filter unwinder names.  If
    this omitted for a specified locus, then all registered unwinders
    in the locus are affected.cr)Nzdisable unwinder)rrJrrrrrrrr�r!zDisableUnwinder.__init__cCrC)rDFNrErFrrrr4�rGzDisableUnwinder.invokerHrrrrrJ�rIrJcCst�t�t�dS)zInstalls the unwinder commands.N)rrBrJrrrr�register_unwinder_commands�s
rK)rrr	r�Commandrr<r@rBrJrKrrrr�<module>s4