Current File : //proc/self/root/kunden/usr/share/gdb/python/gdb/__pycache__/unwinder.cpython-39.opt-1.pyc |
a
ɱZhK � @ s: d Z ddlZG dd� de�ZG dd� de�Zd
dd �ZdS )z.Unwinder class and register_unwinder function.� Nc @ sF e Zd ZdZdd� Zedd� �Zedd� �Zejdd� �Zd d
� 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 C s* t |t�stdt|� ��|| _d| _dS )z\Constructor.
Args:
name: An identifying name for the unwinder.
zincorrect type for name: %sTN)�
isinstance�str� TypeError�type�_name�_enabled)�self�name� r �%/usr/share/gdb/python/gdb/unwinder.py�__init__ s
zUnwinder.__init__c C s | j S �N)r �r r r r r
- s z
Unwinder.namec C s | j S r )r r r r r �enabled1 s zUnwinder.enabledc C s, t |t�stdt|� ��|| _t�� d S )Nz(incorrect type for enabled attribute: %s)r �boolr r r �gdb�invalidate_cached_frames)r �valuer r r r 5 s
c C s t d��dS )z�GDB calls this method to unwind a frame.
Arguments:
pending_frame: gdb.PendingFrame instance.
Returns:
gdb.UnwindInfo instance.
zUnwinder __call__.N)�NotImplementedError)r Z
pending_framer r r �__call__<