Sindbad~EG File Manager

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

�

��g���x�dZddlZddlZejdkrd�Zd�ZnddlmZmZd�ZGd�d	e��Z	dd�Z
dS)
z@
MissingDebugHandler base class, and register_handler function.
�N)��c�*�|���S�N)�isascii��chs �./gdb/missing_debug.pyrr����z�z�|�|��c�*�|���Sr)�isalnumrs r
rrrr)rrc�~�|D]9}t|��rt|��s|dvstd|�d|������:dS)a�Validate a missing debug handler name string.

    If name is valid as a missing debug handler name, then this
    function does nothing.  If name is not valid then an exception is
    raised.

    Arguments:
        name: A string, the name of a missing debug handler.

    Returns:
        Nothing.

    Raises:
        ValueError: If name is invalid as a missing debug handler
                    name.
    z_-zinvalid character 'z' in handler name: N)rr�
ValueError)�namer	s  r
�_validate_namer'sd��"�X�X���r�{�{�	X�7�2�;�;�	X�"��*�*��*�R�R�R�QU�QU�V�W�W�W��X�Xrc�j�eZdZdZd�Zed���Zed���Zejd���Zd�Z	dS)�MissingDebugHandleraJBase class for missing debug handlers written in Python.

    A missing debug handler has a single method __call__ along with
    the read/write attribute enabled, and a read-only attribute name.

    Attributes:
        name: Read-only attribute, the name of this handler.
        enabled: When true this handler is enabled.
    c��t|t��stdt|��z���t	|��||_d|_dS)z�Constructor.

        Args:
            name: An identifying name for this handler.

        Raises:
            TypeError: name is not a string.
            ValueError: name contains invalid characters.
        zincorrect type for name: %sTN)�
isinstance�str�	TypeError�typer�_name�_enabled)�selfrs  r
�__init__zMissingDebugHandler.__init__HsQ���$��$�$�	H��9�D��J�J�F�G�G�G��t������
���
�
�
rc��|jSr)r�rs r
rzMissingDebugHandler.name[s
���z�rc��|jSr)rrs r
�enabledzMissingDebugHandler.enabled_s
���}�rc�|�t|t��stdt|��z���||_dS)Nz(incorrect type for enabled attribute: %s)r�boolrrr)r�values  r
r!zMissingDebugHandler.enabledcs:���%��&�&�	V��F��e���T�U�U�U���
�
�
rc� �td���)a�GDB handle missing debug information for an objfile.

        Arguments:
            objfile: A gdb.Objfile for which GDB could not find any
                debug information.

        Returns:
            True: GDB should try again to locate the debug information
                for objfile, the handler may have installed the
                missing information.
            False: GDB should move on without the debug information
                for objfile.
            A string: GDB should load the file at the given path; it
                contains the debug information for objfile.
            None: This handler can't help with objfile.  GDB should
                try any other registered handlers.
        zMissingDebugHandler.__call__())�NotImplementedError)r�objfiles  r
�__call__zMissingDebugHandler.__call__is��$"�"B�C�C�CrN)
�__name__�
__module__�__qualname__�__doc__r�propertyrr!�setterr(�rr
rr=s������������&����X������X��
�^����^��
D�D�D�D�DrrFc���|�8tjd��rtjd|jz��t}nct	|tj��r:tjd��r%tjd|j�d|j�d���ntd���t|d��t|d	��t|d
��}t|��s$tdt|��jz���d}|j
D]9}|j|jkr"|r	|j
|=ntd
|jz���|dz
}�:|j
�d|��dS)aRegister handler in given locus.

    The handler is prepended to the locus's missing debug handlers
    list. The name of handler should be unique (or replace must be
    True).

    Arguments:
        locus: Either a progspace, or None (in which case the unwinder
               is registered globally).
        handler: An object of a gdb.MissingDebugHandler subclass.

        replace: If True, replaces existing handler with the same name
                 within locus.  Otherwise, raises RuntimeException if
                 unwinder with the same name already exists.

    Returns:
        Nothing.

    Raises:
        RuntimeError: The name of handler is not unique.
        TypeError: Bad locus type.
        AttributeError: Required attributes of handler are missing.
    N�verbosez"Registering global %s handler ...
zRegistering z
 handler for z ...
z%locus should be gdb.Progspace or Nonerr!r(z2'%s' object's '__call__' attribute is not callablerzHandler %s already exists.�)�gdb�	parameter�writerr�	Progspace�filenamer�getattr�callable�AttributeErrorrr)�missing_debug_handlers�RuntimeError�insert)�locus�handler�replace�call_method�i�needles      r
�register_handlerrD~s���2
�}��=��#�#�	L��I�;�g�l�J�K�K�K����	�E�3�=�	)�	)�A��=��#�#�	��I�I�9@����u�~�~�~�V�
�
�
���?�@�@�@��G�V�����G�Y�����'�:�.�.�K��K� � �
��@��7�m�m�$�
%�
�
�	
�
	
�A��.�����;�'�,�&�&��
P��0��3�3�"�#?�'�,�#N�O�O�O�	�Q����	� �'�'��7�3�3�3�3�3r)F)r,�sysr3�version_inforr�curses.asciir�objectrrDr/rr
�<module>rIs��� ���
�
�
�
�
�
�
���v����������.�-�-�-�-�-�-�-�X�X�X�,>D�>D�>D�>D�>D�&�>D�>D�>D�B;4�;4�;4�;4�;4�;4r

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