Sindbad~EG File Manager

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

�

��gK��R�dZddlZGd�de��ZGd�de��Zd	d�ZdS)
z.Unwinder class and register_unwinder function.�Nc�j�eZdZdZd�Zed���Zed���Zejd���Zd�Z	dS)�UnwinderaBase class (or a template) for frame unwinders written in Python.

    An unwinder has a single method __call__ and the attributes
    described below.

    Attributes:
        name: The name of the unwinder.
        enabled: A boolean indicating whether the unwinder is enabled.
    c��t|t��stdt|��z���||_d|_dS)z\Constructor.

        Args:
            name: An identifying name for the unwinder.
        zincorrect type for name: %sTN)�
isinstance�str�	TypeError�type�_name�_enabled)�self�names  �./gdb/unwinder.py�__init__zUnwinder.__init__ sC���$��$�$�	H��9�D��J�J�F�G�G�G���
���
�
�
�c��|jS�N)r
�rs rr
z
Unwinder.name-s
���z�rc��|jSr)rrs r�enabledzUnwinder.enabled1�
���}�rc��t|t��stdt|��z���||_tj��dS)Nz(incorrect type for enabled attribute: %s)r�boolrr	r�gdb�invalidate_cached_frames)r�values  rrzUnwinder.enabled5sK���%��&�&�	V��F��e���T�U�U�U���
��$�&�&�&�&�&rc� �td���)z�GDB calls this method to unwind a frame.

        Arguments:
            pending_frame: gdb.PendingFrame instance.

        Returns:
            gdb.UnwindInfo instance.
        zUnwinder __call__.)�NotImplementedError)r�
pending_frames  r�__call__zUnwinder.__call__<s��"�"6�7�7�7rN)
�__name__�
__module__�__qualname__�__doc__r�propertyr
r�setterr�rrrrs����������������X������X��
�^�'�'��^�'�	8�	8�	8�	8�	8rrc�\�eZdZdZdd�Zed���Zed���Zed���ZdS)�FrameIdz�A Frame-ID class for use when creating gdb.UnwindInfo objects.

    Attributes (all read-only):
        pc: Program counter value.
        sp: The stack-pointer value.
        special: An alternative stack-pointer value, can be None.Nc�0�||_||_||_dSr)�_sp�_pc�_special)r�sp�pc�specials    rrzFrameId.__init__Ps����������
�
�
rc��|jSr)r*rs rr-z
FrameId.spU�	���x�rc��|jSr)r+rs rr.z
FrameId.pcYr1rc��|jSr)r,rs rr/zFrameId.special]rrr)	r r!r"r#rr$r-r.r/r&rrr(r(Hs�������E�E� � � � �
����X������X������X���rr(Fc�V�|�8tjd��rtjd|jz��t}n}t	|tj��st	|tj��r:tjd��r%tjd|j�d|j�d���ntd���d}|j	D]9}|j|jkr"|r	|j	|=ntd	|jz���|d
z
}�:|j	�d|��tj��dS)a~Register unwinder in given locus.

    The unwinder is prepended to the locus's unwinders list. Unwinder
    name should be unique.

    Arguments:
        locus: Either an objfile, progspace, or None (in which case
               the unwinder is registered globally).
        unwinder: An object of a gdb.Unwinder subclass
        replace: If True, replaces existing unwinder with the same name.
                 Otherwise, raises exception if unwinder with the same
                 name already exists.

    Returns:
        Nothing.

    Raises:
        RuntimeError: Unwinder name is not unique
        TypeError: Bad locus type
    N�verbosez#Registering global %s unwinder ...
zRegistering z unwinder for z ...
z4locus should be gdb.Objfile or gdb.Progspace or NonerzUnwinder %s already exists.�)
r�	parameter�writer
r�Objfile�	Progspace�filenamer�frame_unwinders�RuntimeError�insertr)�locus�unwinder�replace�i�needles     r�register_unwinderrDbs>��*
�}��=��#�#�	N��I�<�x�}�L�M�M�M����	�E�3�;�	'�	'�P�:�e�S�]�+K�+K�P��=��#�#�	��I�I�:B�-�-�-�����X�
�
�
���N�O�O�O�	�A��'�����;�(�-�'�'��
R��)�!�,�,�"�#@�8�=�#P�Q�Q�Q�	�Q����	�� � ��H�-�-�-�� �"�"�"�"�"r)F)r#r�objectrr(rDr&rr�<module>rFs��� 5�4�
�
�
�
�08�08�08�08�08�v�08�08�08�f�����f����4*#�*#�*#�*#�*#�*#r

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