Current File : //usr/share/gdb/python/gdb/prompt.pyc
�
�� Rc@s�dZddlZddlZd�Zd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zied6e	d6e
d6ed6ed6ed6ed6ed6ed6e
d6ed6Zd�Zd�ZdS(s# Extended prompt library functions.i����NcCs
tj�S(sThe current working directory.(tostgetcwdu(tignore((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_pwdscCs�|dkr|}ny
|�}Wntjk
r=d|SXt||�rxt||�}t|�rt|�}n|Sd||fSdS(s,Internal worker for fetching GDB attributes.s<no %s>s<no attribute %s on current %s>N(tNonetgdbterrorthasattrtgetattrtcallable(tfunctwhattattrtnattrtobjtresult((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_object_attrs	
	cCsttjd|d�S(s8The selected frame; an argument names a frame parameter.tframetname(RRtselected_frame(R((s#/usr/share/gdb/python/gdb/prompt.pyt
_prompt_frame*scCsttjd|d�S(s:The selected thread; an argument names a thread parameter.tthreadtnum(RRtselected_thread(R((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_thread.scCstjS(sThe version of GDB.(RtVERSION(R((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_version2scCsdS(sThe ESC character.s((R((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_esc6scCsdS(sA backslash.s\((R((s#/usr/share/gdb/python/gdb/prompt.pyt
_prompt_bs:scCsdS(s
A newline.s
((R((s#/usr/share/gdb/python/gdb/prompt.pyt	_prompt_n>scCsdS(sA carriage return.s
((R((s#/usr/share/gdb/python/gdb/prompt.pyt	_prompt_rBscCs
tj|�S(s6A parameter's value; the argument names the parameter.(Rt	parameter(R((s#/usr/share/gdb/python/gdb/prompt.pyt
_prompt_paramFscCsdS(s-Begins a sequence of non-printing characters.s((R((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_noprint_beginJscCsdS(s+Ends a sequence of non-printing characters.s((R((s#/usr/share/gdb/python/gdb/prompt.pyt_prompt_noprint_endNstes\tntrtvtwtftttpt[t]cCsRd}ttj��}x)|D]!}|d|t|jf7}qW|d7}|S(sNGenerate help dynamically from the __doc__ strings of attribute
    functions.ts	  \%s	%s
s�
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.(tsortedtprompt_substitutionstkeyst__doc__(RR0tkey((s#/usr/share/gdb/python/gdb/prompt.pytprompt_help`s
cCs[d}t|�}d}x<||krV||dkr;|d}||krQPn||}|tkr*t|}|d|kr||ddkr|d}x*||kr�||dkr�|d}q�W||ks�||dkr�d}q||d|!}|}nd}|t||��7}qI|||7}n|||7}|d}qW|S(	s Perform substitutions on PROMPT.R-is\it{t}iN(tlenR/Rtstr(tpromptRtplentitcmdchtcmdtjtarg((s#/usr/share/gdb/python/gdb/prompt.pytsubstitute_promptns2


$
		(R1RRRRRRRRRRRR R!R"R/R3R?(((s#/usr/share/gdb/python/gdb/prompt.pyt<module>s8