Sindbad~EG File Manager

Current Path : /usr/local/share/gdb/python/gdb/command/__pycache__/
Upload File :
Current File : //usr/local/share/gdb/python/gdb/command/__pycache__/missing_debug.cpython-311.pyc

�

��g����ddlZddlZd�Zd�ZGd�dej��Zd�Zd�ZGd�d	ej��ZGd
�dej��Z	d�Z
e
��dS)
�Nc�t�	tj|��S#t$rtd|�d|�d����wxYw)a9Compile exp into a compiler regular expression object.

    Arguments:
        exp: The string to compile into a re.Pattern object.
        idstring: A string, what exp is a regexp for.

    Returns:
        A re.Pattern object representing exp.

    Raises:
        SyntaxError: If exp is an invalid regexp.
    zInvalid z	 regexp: �.)�re�compile�SyntaxError)�exp�idstrings  �./gdb/command/missing_debug.py�validate_regexprsR��F��z�#������F�F�F��k�h�h�h����D�E�E�E�F���s��!7c���tj|��}t|��}|dkrtd���d}d}|dkr|d}|dkr|d}t	|d��t	|d��fS)a1Internal utility to parse missing debug handler 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�handler)�gdb�string_to_argv�lenrr)�arg�argv�argc�locus_regexp�name_regexps     r
� parse_missing_debug_command_argsr*s�����c�"�"�D��t�9�9�D��a�x�x��/�0�0�0��L��K��q�y�y��A�w���1�9�9��q�'�K���g�.�.���Y�/�/���c�.��eZdZdZ�fd�Zd�Zd�Z�xZS)�InfoMissingDebugHandersaaGDB command to list missing debug handlers.

    Usage: info missing-debug-handlers [LOCUS-REGEXP [NAME-REGEXP]]

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

    NAME-REGEXP is a regular expression to filter missing debug
    handler names.  If this omitted for a specified locus, then all
    registered handlers in the locus are listed.
    c�`��t���dtj��dS)Nzinfo missing-debug-handlers��super�__init__r�
COMMAND_FILES��self�	__class__s �r
r!z InfoMissingDebugHanders.__init__Ws'���
�����6��8I�J�J�J�J�Jrc��|sdSt|��|D]>}|�|j��r"td|j�|jrdnd�����?dS)z�Lists the missing debug handlers whose name matches regexp.

        Arguments:
            title: The line to print before the list.
            handlers: The list of the missing debug handlers.
            name_re: handler name filter.
        Nz  rz [disabled])�print�match�name�enabled)r$�title�handlers�name_rers     r
�
list_handlersz%InfoMissingDebugHanders.list_handlersZsz���	��F�
�e�����	�	�G��}�}�W�\�*�*�
��� '���G�O�.V�b�b��.V�W�����	�	rc�8�t|��\}}|�d��rB|jdkr7tj��}|�d|jz|j|��tj��D]d}|jpd}|�|��rD|dkr|tj��krd}nd}nd|z}|�||j|���e|�d��r#|�dtj|��dSdS)N�	progspacerz
Progspace %s:zCurrent Progspace:zProgspace <no-file>:�globalzGlobal:)	rr(�patternr�current_progspacer.�filename�missing_debug_handlers�
progspaces)	r$r�from_tty�locus_rer-�cpr0r4�msgs	         r
�invokezInfoMissingDebugHanders.invokeksD��<�S�A�A���'��>�>�+�&�&�	�8�+;�r�+A�+A��&�(�(�B�����"�+�-�r�/H�'�
�
�
���)�)�	�	�I� �)�/�R�H��~�~�h�'�'�
��r�>�>� �C�$9�$;�$;�;�;�2���4���)�H�4�C��"�"���4�������>�>�(�#�#�	O����y�#�*D�g�N�N�N�N�N�	O�	Or)�__name__�
__module__�__qualname__�__doc__r!r.r;�
__classcell__�r%s@r
rrGsl�������
�
�K�K�K�K�K����"O�O�O�O�O�O�Orrc�v�d}|D]3}|�|j��r|j|kr||_|dz
}�4|S)a/Enable/disable missing debug handlers whose names match given regex.

    Arguments:
        handlers: The list of missing debug handlers.
        name_re: Handler name filter.
        flag: A boolean indicating if we should enable or disable.

    Returns:
        The number of handlers affected.
    rr)r(r)r*)r,r-�flag�totalrs     r
�do_enable_handler1rE�sP��
�E������=�=���&�&�	�7�?�d�+B�+B�"�G�O��Q�J�E���Lrc��t|��\}}d}|�d��r|ttj||��z
}|�d��r5|jdkr*|ttj��j||��z
}tj��D]9}|jpd}|�|��r|t|j||��z
}�:td||dkrdnd|rdnd	fz��d
S)z)Enable or disable missing debug handlers.rr1r0rz%d missing debug handler%s %sr�sr*�disabledN)
rr(rErr5r2r3r6r4r')rrCr8r-rDr0r4s       r
�do_enable_handlerrI�s0��:�3�?�?��X�w�
�E��~�~�h���O�
�#�C�$>���N�N�N���~�~�k�"�"�
�x�'7�2�'=�'=�
�#��!�#�#�:�G�T�
�
�	
���^�%�%�Y�Y�	��%�+����>�>�(�#�#�	Y��'�	�(H�'�SW�X�X�X�E��	�'����
�
�"�"��$�-N�Y�Y�J�
O�	P�����rc�(��eZdZdZ�fd�Zd�Z�xZS)�EnableMissingDebugHandlera�GDB command to enable missing debug handlers.

    Usage: enable missing-debug-handler [LOCUS-REGEXP [NAME-REGEXP]]

    LOCUS-REGEXP is a regular expression specifying the handlers to
    enable.  It can be 'global', 'progspace' for the current
    progspace, or the filename for a file associated with a progspace.

    NAME_REGEXP is a regular expression to filter handler names.  If
    this omitted for a specified locus, then all registered handlers
    in the locus are affected.
    c�`��t���dtj��dS)Nzenable missing-debug-handlerrr#s �r
r!z"EnableMissingDebugHandler.__init__�s'���
�����7��9J�K�K�K�K�Krc�&�t|d��dS)�&GDB calls this to perform the command.TN�rI�r$rr7s   r
r;z EnableMissingDebugHandler.invoke�s���#�t�$�$�$�$�$r�r<r=r>r?r!r;r@rAs@r
rKrK�sV���������L�L�L�L�L�%�%�%�%�%�%�%rrKc�(��eZdZdZ�fd�Zd�Z�xZS)�DisableMissingDebugHandlera�GDB command to disable missing debug handlers.

    Usage: disable missing-debug-handler [LOCUS-REGEXP [NAME-REGEXP]]

    LOCUS-REGEXP is a regular expression specifying the handlers to
    enable.  It can be 'global', 'progspace' for the current
    progspace, or the filename for a file associated with a progspace.

    NAME_REGEXP is a regular expression to filter handler names.  If
    this omitted for a specified locus, then all registered handlers
    in the locus are affected.
    c�`��t���dtj��dS)Nzdisable missing-debug-handlerrr#s �r
r!z#DisableMissingDebugHandler.__init__�s'���
�����8�#�:K�L�L�L�L�Lrc�&�t|d��dS)rNFNrOrPs   r
r;z!DisableMissingDebugHandler.invoke�s���#�u�%�%�%�%�%rrQrAs@r
rSrS�sV���������M�M�M�M�M�&�&�&�&�&�&�&rrSc�Z�t��t��t��dS)z,Installs the missing debug handler commands.N)rrKrS�rr
�'register_missing_debug_handler_commandsrX�s,����������� � � � � r)rrrr�CommandrrErIrKrSrXrWrr
�<module>rZs��$
�	�	�	�
�
�
�
�F�F�F�&���:?O�?O�?O�?O�?O�c�k�?O�?O�?O�D���&���(%�%�%�%�%���%�%�%�,&�&�&�&�&���&�&�&�,!�!�!�(�'�)�)�)�)�)r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists