Sindbad~EG File Manager
�
��gh � �� � d Z ddlZ G d� de� � Z G d� de� � Z G d� de� � Z G d � d
e� � Z G d� de� � Z G d
� de� � Z G d� de� � Z G d� de� � Z
G d� dej � � Z G d� dej � � Z
G d� dej � � Ze� � � e� � e
� � e� � dS )zEImplementation of the GDB 'explore' command using the GDB Python API.� Nc �( � e Zd ZdZi Zej ej ej ej ej
ej fZe
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d� � � Ze
d � � � Ze
d
� � � ZdS )�Explorerz-Internal class which invokes other explorers.c � � t | � � }d}| d dk r| |dz
dk rnId}||k rA| | }|dk s$d|k r|dk sd |k r|d
k sd|k r|dk rnd
}n|dz
}||k �A|rd| z dz S | S )NFr �(� �)�_�a�z�A�Z�0�9T)�len)�expr�length�guard�i�cs �./gdb/command/explore.py�
guard_exprzExplorer.guard_expr% s� � ��T��������7�c�>�>�d�6�A�:�.�#�5�5���A��f�*�*���G����H�H��q���Q�#�X�X��q���Q�#�X�X��q���Q�#�X�X�� �E���Q��� �f�*�*� � ���:��#�#��K� c � � |j j }|t j v rEt j | }|� | ||� � r |� | ||� � �dS dS t dt
|j � � z � � dS )a� Main function to explore an expression value.
Arguments:
expr: The expression string that is being explored.
value: The gdb.Value value of the expression.
is_child: Boolean value to indicate if the expression is a child.
An expression is a child if it is derived from the main
expression entered by the user. For example, if the user
entered an expression which evaluates to a struct, then
when exploring the fields of the struct, is_child is set
to True internally.
Returns:
No return value.
�*Explorer for type '%s' not yet available.
N)�type�coder �type_code_to_explorer_map�explore_expr�print�str)r �value�is_child� type_code�explorer_classs r r zExplorer.explore_exprA s� � �"