Sindbad~EG File Manager
�
��gK � �R � d Z ddlZ G d� de� � Z G d� de� � Zd d�ZdS )
z.Unwinder class and register_unwinder function.� Nc �j � e Zd ZdZd� Zed� � � Zed� � � Zej d� � � Zd� Z dS )�Unwindera Base 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 � � st dt |� � 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 � � | j S �N)r
�r s r r
z
Unwinder.name- s
� ��z�r c � � | j S r )r r s r �enabledzUnwinder.enabled1 �
� ��}�r c � � t |t � � st dt |� � z � � �|| _ t j � � d S )Nz(incorrect type for enabled attribute: %s)r �boolr r r �gdb�invalidate_cached_frames)r �values r r zUnwinder.enabled5 sK � ��%��&�&� V��F��e���T�U�U�U���
��$�&�&�&�&�&r c � � t d� � �)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__<