Sindbad~EG File Manager
�
��g � � � d dl Z d dlZd� Zd� Z G d� dej � � Zd� Zd� Z G d� d ej � � Z G d
� dej � � Z d� Z
e
� � dS )
� Nc �t � t j | � � S # t $ r t d|�d| �d�� � �w xY w)NzInvalid z regexp: �.)�re�compile�SyntaxError)�exp�idstrings �./gdb/command/unwinders.py�validate_regexpr sR � �F��z�#������ F� F� F��k�h�h�h����D�E�E�E�F���s � �!7c �� � t j | � � }t |� � }|dk rt d� � �d}d}|dk r|d }|dk r|d }t |d� � t |d� � fS )a$ Internal utility to parse unwinder 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�unwinder)�gdb�string_to_argv�lenr r )�arg�argv�argc�locus_regexp�name_regexps r
�parse_unwinder_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�.�.���Z�0�0�� � c �. � � e Zd ZdZ� fd�Zd� Zd� Z� xZS )�InfoUnwindera6 GDB command to list unwinders.
Usage: info unwinder [LOCUS-REGEXP [NAME-REGEXP]]
LOCUS-REGEXP is a regular expression matching the location of the
unwinder. If it is omitted, all registered unwinders from all
loci are listed. A locus can be 'global', 'progspace' to list
the unwinders from the current progspace, or a regular expression
matching filenames of objfiles.
NAME-REGEXP is a regular expression to filter unwinder names. If
this omitted for a specified locus, then all registered unwinders
in the locus are listed.c �n �� t t | � � � dt j � � d S )Nz
info unwinder)�superr �__init__r �
COMMAND_STACK��self� __class__s �r
r zInfoUnwinder.__init__J s, �� �
�l�D�!�!�*�*�?�C�<M�N�N�N�N�Nr c � � |sdS t |� � |D ]>}|� |j � � r"t d|j �|j rdnd��� � �?dS )z�Lists the unwinders whose name matches regexp.
Arguments:
title: The line to print before the list.
unwinders: The list of the unwinders.
name_re: unwinder name filter.
Nz r z [disabled])�print�match�name�enabled)r# �title� unwinders�name_rer s r
�list_unwinderszInfoUnwinder.list_unwindersM s~ � � � ��F�
�e����!� � �H��}�}�X�]�+�+�
����}�}�H�,<�&O�b�b�-�&O�Q�� � �� � r c �� � t |� � \ }}|� d� � r!| � dt j |� � |� d� � r7t j � � }| � d|j z |j |� � t j � � D ]@}|� |j � � r$| � d|j z |j |� � �Ad S )N�globalzGlobal:� progspacez
Progspace %s:zObjfile %s:)r r'