Current File : //proc/self/root/kunden/usr/share/gdb/python/gdb/__pycache__/prompt.cpython-39.opt-1.pyc
a

ɱZh~�@s�dZddlZddlZdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zee	e
eeeeeee
ed�Zdd�Zdd�ZdS) z# Extended prompt library functions.�NcCst��S)zThe current working directory.)�os�getcwd)�ignore�r�#/usr/share/gdb/python/gdb/prompt.py�_prompt_pwdsrcCsj|dur|}z
|�}Wntjy2d|YS0t||�rZt||�}t|�rV|�}|Sd||fSdS)z,Internal worker for fetching GDB attributes.Nz<no %s>z<no attribute %s on current %s>)�gdb�error�hasattr�getattr�callable)�funcZwhat�attrZnattr�obj�resultrrr�_prompt_object_attrs


rcCsttjd|d�S)z8The selected frame; an argument names a frame parameter.�frame�name)rrZselected_frame�rrrr�
_prompt_frame-srcCsttjd|d�S)z:The selected thread; an argument names a thread parameter.�threadZnum)rrZselected_threadrrrr�_prompt_thread2srcCstjS)zThe version of GDB.)rZVERSIONrrrr�_prompt_version7srcCsdS)zThe ESC character.�rrrrr�_prompt_esc<srcCsdS)zA backslash.�\rrrrr�
_prompt_bsAsrcCsdS)z
A newline.�
rrrrr�	_prompt_nFsrcCsdS)zA carriage return.�
rrrrr�	_prompt_rKsr cCs
t�|�S)z6A parameter's value; the argument names the parameter.)rZ	parameterrrrr�
_prompt_paramPsr!cCsdS)z-Begins a sequence of non-printing characters.�rrrrr�_prompt_noprint_beginUsr#cCsdS)z+Ends a sequence of non-printing characters.�rrrrr�_prompt_noprint_endZsr%)�er�n�r�v�w�f�t�p�[�]cCs<d}tt���}|D]}|d|t|jf7}q|d7}|S)zNGenerate help dynamically from the __doc__ strings of attribute
    functions.�z	  \%s	%s
z�
A substitution can be used in a simple form, like "\f".
An argument can also be passed to it, like "\f{name}".
The meaning of the argument depends on the particular substitution.)�sorted�prompt_substitutions�keys�__doc__)rr3�keyrrr�prompt_helpnsr6cCs�d}t|�}d}||kr�||dkr�|d}||kr6q�||}|tvr�t|}|d|kr�||ddkr�|d}||kr�||dkr�|d}qr||ks�||dkr�d}q�||d|�}|}nd}|t||��7}q�|||7}n|||7}|d}q|S)	z Perform substitutions on PROMPT.r0rr��{�}N�)�lenr2�str)�promptr�plen�iZcmdch�cmd�j�argrrr�substitute_prompt}s2

rC)r4rrrrrrrrrrr r!r#r%r2r6rCrrrr�<module>s8�