HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/gdb/python/gdb/__pycache__/prompt.cpython-310.pyc
o

̴6b~�@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_pwdsrcCsf|dur|}z|�}Wntjyd|YSwt||�r-t||�}t|�r+|�}|Sd||fS)z,Internal worker for fetching GDB attributes.Nz<no %s>z<no attribute %s on current %s>)�gdb�error�hasattr�getattr�callable)�func�what�attr�nattr�obj�resultrrr�_prompt_object_attrs
�

rcC�ttjd|d�S)z8The selected frame; an argument names a frame parameter.�frame�name)rr�selected_frame�rrrr�
_prompt_frame-�rcCr)z:The selected thread; an argument names a thread parameter.�thread�num)rr�selected_threadrrrr�_prompt_thread2rrcCstjS)zThe version of GDB.)r�VERSIONrrrr�_prompt_version7sr cC�dS)zThe ESC character.�rrrrr�_prompt_esc<�r#cCr!)zA backslash.�\rrrrr�
_prompt_bsAr$r&cCr!)z
A newline.�
rrrrr�	_prompt_nFr$r(cCr!)zA carriage return.�
rrrrr�	_prompt_rKr$r*cCs
t�|�S)z6A parameter's value; the argument names the parameter.)r�	parameterrrrr�
_prompt_paramPs
r,cCr!)z-Begins a sequence of non-printing characters.�rrrrr�_prompt_noprint_beginUr$r.cCr!)z+Ends a sequence of non-printing characters.�rrrrr�_prompt_noprint_endZr$r0)�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__)rr>�keyrrr�prompt_helpnsrAcCsd}t|�}d}||kr�||dkr}|d}||kr	|S||}|tvrvt|}|d|krk||ddkrk|d}||krS||dkrS|d}||krS||dksE||ks]||dkr`d}n
||d|�}|}nd}|t||��7}n
|||7}n|||7}|d}||ks|S)	z Perform substitutions on PROMPT.r;rr%��{�}N�)�lenr=�str)�promptr�plen�i�cmdch�cmd�j�argrrr�substitute_prompt}s8��� rO)r?rrrrrrr r#r&r(r*r,r.r0r=rArOrrrr�<module>s:�