+
    VBi                     B   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt ^ RIHt Rt	 ^ RIt^ RIt]! ]R4      '       d   ^ RIHt M^ R	IHt ^ R
IHt RtRt]! ]]R7      t]P8                  ! 4       ;'       g    RtRfR ltR tRgR lt R t!R t"RhR lt# ! R R4      t$ ! R R4      t% ! R R]%4      t&0 Rimt'R t( ! R R4      t) ! R R4      t* ! R  R!]PV                  4      t, ! R" R#],4      t- ! R$ R%]-4      t. ! R& R']P^                  4      t0 ! R( R)]04      t1 ! R* R+]04      t2 ! R, R-]04      t3 ! R. R/4      t4]4! 4       t5 ! R0 R1]Pl                  ])4      t7 ! R2 R3]74      t8 ! R4 R5]74      t9 ! R6 R7]74      t: ! R8 R9])]Pv                  4      t< ! R: R;]7]Pz                  4      t> ! R< R=]>]P~                  4      t@ ! R> R?]@4      tA ! R@ RA]>4      tB ! RB RC]>4      tC ! RD RE]>4      tD ! RF RG]74      tE ! RH RI]E4      tF ! RJ RK]74      tG ! RL RM]74      tH ! RN RO]74      tI ! RP RQ]74      tJRR tK ! RS RT]74      tL ! RU RV]L4      tM ! RW RX4      tN ! RY RZ]7]P                  ]N4      tP ! R[ R\]74      tQ ! R] R^]P                  ])4      tS ! R_ R`]S4      tT ! Ra Rb]P                  ])4      tU ! Rc Rd]P                  ])]N4      tV]<! 4       tW]8P                  4       tY]Y]WnY        Re tZ]Z! 4        R#   ]
 d    ^ RIHt Rt	 ELi ; i  ]
 d"    Rt]P                   P#                  R4        ELi ; i)jz)
GDB extension that adds Cython support.
N)etreeT)ElementTreeFz,Install pygments for colorized source code.
string_to_argv)r   )split)	libpythonCObjectPythonObject)r   r   zUTF-8c                    a  V 3R  lpV# )c                 N   <a  \         P                  ! S 4      RVV 3R ll4       pV# )Nc                    <  T;'       g    \         P                  ! 4       pS'       d   TP	                  4       f   \        4       hS! Y.TO5/ TB #   \         d    \         P                  ! R 4      hi ; izNo frame is currently selected.)gdbselected_frameRuntimeErrorGdbErrornameNoFunctionNameInFrameError)selfframeargskwargserrfunctions   &&*,>/usr/lib/python3.14/site-packages/Cython/Debugger/libcython.pywrapper>default_selected_gdb_frame.<locals>.decorator.<locals>.wrapper/   sp    F55!3!3!5 uzz|+022D9$9&99   Fll#DEEFs   A A "A4N	functoolswraps)r   r   r   s   f r   	decorator-default_selected_gdb_frame.<locals>.decorator.   s%    		"		: 
#		:      )r   r    s   f r   default_selected_gdb_framer$   -   s     r"   c                 X   a  \         P                  ! S 4      \        V 3R  l4       4       pV# )c                    < VP                  R 4      ;'       g    \        P                  ! 4       pV P                  V4      '       g   \        P                  ! R4      hS! V .VO5/ VB # )r   zHSelected frame does not correspond with a Cython function we know about.)getr   r   is_cython_functionr   )r   r   r   r   r   s   &*, r   r   %require_cython_frame.<locals>.wrapper?   sc     

7#;;s'9'9';&&u--,,  @ A A.t.v..r"   )r   r   require_running_programr   r   s   f r   require_cython_framer,   >   s-    __X/  / Nr"   c                    a a V V3R  lpV# )c                 L   <a  \         P                  ! S 4      VV V3R  l4       pV# )c                 X  < V P                  4       pV P                  4       pV'       g   V'       d   S'       g   S! V .VO5/ VB  R# V'       d   \        P                  ! S4       R# V P	                  4       '       d   \        P                  ! S4       R# \        P
                  ! R 4      h)zFNot a function cygdb knows about. Use the normal GDB commands instead.N)r(   is_python_functionr   executeis_relevant_functionr   )r   r   r   is_cyis_py	c_commandr   python_commands   &*,  r   r   5dispatch_on_frame.<locals>.decorator.<locals>.wrapperL   s{    ++-E++-E~///N+**,,I&ll $J K Kr"   r   )r   r   r5   r6   s   f r   r    $dispatch_on_frame.<locals>.decoratorK   s'    		"	K 
#	K r"   r#   )r5   r6   r    s   ff r   dispatch_on_framer9   J   s    " r"   c                 F   a  \         P                  ! S 4      V 3R  l4       pV# )c                     <  \         P                  ! 4        S! T / TB #   \         d    \         P                  ! R 4      hi ; ir   )r   r   r   r   )r   r   r   s   *,r   r   (require_running_program.<locals>.wrapper`   sJ    	B  (((  	B,,@AA	Bs	     "Ar   r+   s   f r   r*   r*   _   s%    __X) ) Nr"   c                 F   a  \         P                  ! S 4      V 3R  l4       pV# )c                 |   < \        V\        P                  4      '       d   VP                  4       pS! W.VO5/ VB # r   )
isinstancer   Valuestring)r   rA   r   r   r   s   &&*,r   r   .gdb_function_value_to_unicode.<locals>.wrapperl   s4    fcii((]]_F6t6v66r"   r   r+   s   f r   gdb_function_value_to_unicoderC   k   s%    __X7 7
 Nr"   c                  a  ^ RI p\        VP                  S P                  4      P                  4      pV'       d!   V Uu. uF  qQP                  WU4      NK  	  upMTpR	pV'       d<   \        \        S 4      P                  4       4      pV U	u. uF  qV9  g   K  V	NK  	  pp	R
V 3R llp
RP                  S P                  P                  RRP                  V
! RWd4      4      R.V
! RV4      O4      # u upi u up	i )a  Prints out all instance variables needed to recreate an object.

Following the python convention for __repr__, this function prints all the
information stored in an instance as opposed to its class. The working
assumption is that most initialization arguments are stored as a property
using the same name.

The object contents are displayed as the initialization call followed by,
optionally, the value of each of the instance's properties in the form:
```
ClassName(
        init_arg_1 = "repr of some example str",
        ...
    )
self.state_based_property = ...
```

Function arguments:
self        Instance to be represented

renamed     Dictionary of initialization arguments that are stored under a
            different property name in the form { argument: property }

state       Boolean representing whether properties outside the
            initialization parameters should be printed (self.prop = ...).
            Using `False` may make the class more amenable to recursive repr
Nc              3      <"   \        Y;'       g    T4       F5  w  r4\        \        SV4      4      P                  R R4      pV  V RV 2x  K7  	  R# 5i)

		 = N)zipreprgetattrreplace)prefixattrsr   attrargparamr   s   &&&   r   names_and_values%simple_repr.<locals>.names_and_values   sP     UMME2IDt,-55dHEEHSEUG,, 3s   AA (,rG   z
	)z
self.r#   r   )inspecttuple	signature__init__
parametersr'   sortedvarskeysjoin	__class____qualname__)r   renamedstaterW   init_arg_namesrP   
init_attrs
state_reprinstance_attrsrO   rR   s   f&&        r   simple_reprrh   x   s    8 7,,T]];FFGN 4BB>C++c'>B* JT
 12'5P~tZ9Odd~
P-
 77NN''HH%h
KL 'y*=   C
 Qs    C3C8C8c                   ,   a  ] tR t^t o R tR tRtV tR# )CythonModulec                b    Wn         W n        W0n        / V n        / V n        / V n        / V n        R # r   )r   filename
c_filenameglobalslineno_cy2clineno_c2cy	functions)r   module_namerl   rm   s   &&&&r   rZ   CythonModule.__init__   s/    	 $r"   c                "    \        V R R/RR7      # )rr   r   F)rb   rc   rh   r   s   &r   __repr__CythonModule.__repr__   s    4-)@NNr"   )rm   rl   rq   rn   rp   ro   r   N__name__
__module__ra   __firstlineno__rZ   rw   __static_attributes____classdictcell____classdict__s   @r   rj   rj      s     	O Or"   rj   c                   ,   a  ] tR t^t o R tR tRtV tR# )CythonVariablec                V    Wn         W n        W0n        W@n        \	        V4      V n        R # r   )r   cnamequalified_nametypeintlineno)r   r   r   r   r   r   s   &&&&&&r   rZ   CythonVariable.__init__   s"    	
,	&kr"   c                    \        V 4      # r   ru   rv   s   &r   rw   CythonVariable.__repr__   s    4  r"   )r   r   r   r   r   Nry   r   s   @r   r   r      s     "! !r"   r   c                   :   a a ] tR t^t o]R3V 3R lltRtVtV ;t# )CythonFunctionFalsec	                   < \         S	V `  VVVVV4       Wn        W@n        VR 8H  V n        / V n        . V n        \        4       V n        R# )TrueN)	superrZ   modulepf_cnameis_initmodule_functionlocals	argumentssetstep_into_functions)
r   r   r   r   r   r   r   r   r   r`   s
   &&&&&&&&&r   rZ   CythonFunction.__init__   sQ     	-2-;-1-3		5
  &<&F##&5 r"   )r   r   r   r   r   r   )	rz   r{   ra   r|   r   rZ   r}   r~   __classcell__r`   r   s   @@r   r   r      s      (/) )r"   r   c                &   V  R2p\        \        V 4      4       F  pVP                  R4      '       d   K  \        W4      p\	        V4      '       d   VP
                  \        9   d   V! 4       p\        V4      \        P                  \        P                  \        P                  39   d+   \        V4      P                  R4      P                  RR4      pY R2\        V\         4      '       d   VR8w  d   VR R2MV R2,           ,          pK  	  V# )a  Returns a string representing the internal state of a provided GDB frame
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Frames-In-Python.html

Created to serve as GDB.Frame.__repr__ for debugging purposes. GDB has many
layers of abstraction separating the state of the debugger from the
corresponding source code. This prints a tree of instance properties,
expanding the values for Symtab_and_line, Symbol, and Symtab.

Most of these properties require computation to determine, meaning much of
relevant info is behind a monad, a subset of which are evaluated.

Arguments
frame       The GDB.Frame instance to be represented as a string
rF   __z
	: linex)r\   dir
startswithrK   callablera   frame_repr_whitelistr   r   Symtab_and_lineSymbolSymtab
frame_reprrstriprL   r?   r   )r   res	attributevalues   &   r   r   r      s     G2,CCJ'	%%)E??u115IIGE;3..

CJJGGu%,,T2::4HEB",UC"8"8Y&=P5)2wb\# 	# ( Jr"   c                   P  a  ] tR tRt o ]! RR7      R 4       t]! RR7      R 4       t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t	]! 4       R	 4       t
]! 4       R
 4       t]! 4       R 4       t]! 4       R 4       t]! RR7      RR l4       tR tR tRR ltR tRtV tR# )
CythonBasei  F)r   c                P    VP                  4       V P                  P                  9   # r   )r   cyfunctions_by_cnamer   r   s   &&r   r(   CythonBase.is_cython_function  s    zz|tww9999r"   c                    VP                  4       R8X  dD   \        P                  ! V4      P                  4       pT;'       d    VP	                  4       '       * # R# )z
Tells if a frame is associated with a Python function.
If we can't read the Python frame information, don't regard it as such.
PyEval_EvalFrameExF)r   r   Frameget_pyopis_optimized_out)r   r   pyframes   && r   r0   CythonBase.is_python_function  sG     ::<//ooe,557G==7#;#;#===r"   c                "    VP                  4       # r   )r   r   s   &&r   get_c_function_nameCythonBase.get_c_function_name(  s    zz|r"   c                6    VP                  4       P                  # r   )find_salr   r   s   &&r   get_c_linenoCythonBase.get_c_lineno,  s    ~~$$$r"   c                    V P                   P                  P                  VP                  4       4      pVf   \	        4       hV# r   )r   r   r'   r   NoCythonFunctionInFrameError)r   r   results   && r   get_cython_functionCythonBase.get_cython_function0  s5    ++//

=>.00r"   c                    V P                  V4      pVP                  P                  P                  V P	                  V4      R4      # )z
Get the current Cython line number. Returns ("<no filename>", 0) if there is no
correspondence between the C and Cython code.
)z<no filename>    )r   r   rp   r'   r   )r   r   cyfuncs   && r   get_cython_linenoCythonBase.get_cython_lineno8  s=     ))%0}}((,,T->->u-EG[\\r"   c                   R ;p;r4V P                  V4      '       d}   V P                  V4      P                  P                  pV P	                  V4      pW%^ ,          8X  g   Q hV^,          p\
        '       d!   \
        P                  P                  RR7      pEM'V P                  V4      '       d   \        P                  ! V4      P                  4       pV'       g   \        P                  ! R4      hVP                  4       pVP                  4       p\
        '       d!   \
        P                  P                  RR7      pMVP!                  4       pV'       d   VP"                  '       g   R p^ pMRVP"                  P%                  4       pVP&                  p\
        '       d!   \
        P                  P)                  RR7      p\+        W$4      V3# )NF)stripallz*Unable to read information on python frame)r(   r   r   rl   r   pygmentslexersCythonLexerr0   r   r   r   r   r   current_line_numPythonLexerr   symtabfullnamer   CLexerSourceFileDescriptor)r   r   rl   r   lexerfilename_and_linenopyframeobjectsymbol_and_line_objs   &&      r   get_source_descCythonBase.get_source_descA  sr   $(((6""5))//6==FFH"&"8"8"?15555(+Fx 33U3C$$U++%OOE2;;=M llHJ J %--/H"335Fx 33U3C"'.."2&.A.H.H.H.55>>@,118$OO22E2BE#H4f<<r"   c                H    V P                  4       w  r#VP                  V4      # r   )r   
get_source)r   r   source_descr   s   &&  r   get_source_lineCythonBase.get_source_lined  s$    "224%%f--r"   c                "   VP                  4       pVP                  4       pV P                  V4      '       g   V P                  V4      '       d   R# V'       d7   V P                  V4      '       d    V P	                  V4      pW$P
                  9   # R# )zT
returns whether we care about a frame on the user-level when debugging
Cython code
TF)r   olderr(   r0   r   r   )r   r   r   older_framecython_funcs   &&   r   r2   CythonBase.is_relevant_functioni  ss     zz|kkm""5))T-D-DU-K-KT44[AA22;?K::::r"   c                  a a \         P                  ! 4       pSP                  4         S P                  S4      w  rVT'       g{   S P                  S4      '       dd   \        P                  ! S4      P                  4       pTe   TP                  4       '       d   S P                  STRR7      # TP                  pRp	. p
MqS P                  S4      '       d4   S P                  S4      pTT 3R lpTP                  pTP                   p	. p
M'S P                  S4      w  rVSP                  4       pTp	. p
 \         P"                  ! T	4      pTP$                  p\'        T\(        4      '       gI   \'        T\*        \,        34      '       g   \+        T4      p\)        TP/                  4       ^ ,          ^ 4      pRP3                  R T
 4       4      p\4        P6                  P9                  R	Y.Y3,          4       TP:                  e2   \4        P6                  P9                  R
TP:                  : RT: 24       \4        P6                  P9                  R4        \4        P6                  P9                  RTP=                  T4       R24       TP                  4        R#   \         d    \        RT,          4        R# i ; i  \0         d    ^ p ELi ; i  \         P>                   d     Lai ; i)zS
Print a C, Cython or Python stack frame and the line of source code
if available.
z%#%-2d Unknown Frame (compile with -g)NT)is_cr   c                 R   < SP                   P                  P                  V SR 7      # )r   )r   	cy_cvalueinvoke)rP   r   r   s   &r   <lambda>-CythonBase.print_stackframe.<locals>.<lambda>  s    DGG--44S4Fr"   z, c              3   8   "   T F  w  rV: R V: 2x  K  	  R# 5i)=Nr#   ).0r   vals   &  r   	<genexpr>.CythonBase.print_stackframe.<locals>.<genexpr>  s     GY	s+Y   z#%-2d 0x%016x in %s(%s)z at :rF       ) r   r   selectr   r   printr0   r   r   r   r   print_stackframeco_namer(   r   r   r   parse_and_evaladdressr?   r   strbytesr   r   r_   sysstdoutwriterl   r   r   )r   r   indexr   r   r   r   r   	func_name
func_cname	func_argsr   f	gdb_valuefunc_addressas   ff&&            r   r   CythonBase.print_stackframez  s\    ++-	"&"6"6u"=K
 //66ooe,557G'":":"<"<,,UE,EEI-JI$$U++--e4FFAIJI"&"6"6u"=K

I"JI
	?**:6I %,,LlC00!,e==#&|#4L"<#5#5#7#:A>IIGYGG

2e95XXY+JJK,@,@&IJ

	JJtK$:$:6$B#C2FG 	g * 	9EAB	8  	L	( || 		s5   J 0J7 2K J43J47KKK#"K#c                   \         P                  ! R 4      p \         P                  ! R4      pTP                  TP                  4       4      pTR,          #   \         d,    \         P                  ! \
        P                  ! R4      4      hi ; i)__pyx_mPyModuleObjectzy                Unable to lookup type PyModuleObject, did you compile python
                with debugging support (-g)?md_dict)	r   r   lookup_typer   r   textwrapdedentcastpointer)r   mr  s   &  r   get_remote_cython_globals_dict)CythonBase.get_remote_cython_globals_dict  s{    y)	2 __-=>N FF>))+,|  	2,,x 00  1 2 2	2s   A 6Bc                    V P                  4       p\        P                  P                  V4      p/ p\	        4       pVP                  4        F  w  rVWcVP                  V4      &   K  	  V# )zS
Get the Cython globals dict where the remote names are turned into
local strings.
)r  r   PyObjectPtrfrom_pyobject_ptrr   	iteritemsproxyval)r   remote_dictpyobject_dictr   seenkvs   &      r   get_cython_globals_dict"CythonBase.get_cython_globals_dict  sa    
 99;!--??Lu!++-DA'(1::d#$ . r"   Nc                    \         P                  ! V4      '       d   R pMRVP                  : R2pVf   \        V: V: RV: V: 24       R# \        RWCWV3,          4       R# )rT   rU   z) NrH   z%s%-*s = %s%s)r   pretty_printer_lookupr   r   )r   r   r   max_name_lengthrM   typenames   &&&&& r   print_gdb_valueCythonBase.print_gdb_value  sV    **511H 2 #(**.H"645AB/Vde$TTUr"   c                8   VP                   V,          pV P                  4       ^,          pRVP                  9   dS   WAP                  8  dA   VP                  \
        8X  d*   \        \        P                  ! VP                  4      4      # R# R# WCP                  8  # )   z->TF)	r   r   r   r   r   r   r   r   r   )r   r   
local_namecyvar
cur_linenos   &&&  r   is_initializedCythonBase.is_initialized  sv    "":.++-a0
5;;...::-s11%++>??LL((r"   r#   )F)NrT   )rz   r{   ra   r|   r$   r(   r0   r   r   r   r   r   r   r2   r   r  r"  r(  r/  r}   r~   r   s   @r   r   r     s    E*: +:  E* +  ! "  !% "%  ! "  !] "]  ! = " =D  !. ".  ! "   E*?  +? B	V) )r"   r   c                   F   a  ] tR tRt o R	R ltR tR tR tR
R ltRt	V t
R# )r   i  Nc                *    Wn         W n        W0n        R # r   )rl   r   	formatter)r   rl   r   r3  s   &&&&r   rZ   SourceFileDescriptor.__init__  s     
"r"   c                    V P                   R J# r   )rl   rv   s   &r   validSourceFileDescriptor.valid  s    }}D((r"   c                Z   \         '       d   V P                  '       d   \        P                  '       dw   \        P                  P
                  pV P                  f"   \         P                  P                  VR7      pMV P                  p\         P                  ! WP                  V4      # V# )N)bg)
r   r   r[   colorize_codeterminal_backgroundr   r3  
formattersTerminalFormatter	highlight)r   coder9  r3  s   &&  r   lexSourceFileDescriptor.lex  ss    8


z'?'?'?//55B~~%$//AARAH	 NN	%%dJJ	BBr"   c              #    "   \        V P                  4      ;_uu_ 4       pV'       d6   V'       d.   V P                  VP                  4       4      P	                  4       p\
        P                  ! Wa^,
          V^,
          4      p\        V4       FZ  w  rW,           V8X  d   Rp
MRp
V'       d   V'       g   V P                  V	4      p	RWV,           V	P                  4       3,          x  K\  	  RRR4       R#   + '       g   i     R# ; i5i)r+  > z%s %4d    %sN)	openrl   r@  read
splitlines	itertoolsislice	enumerater   )r   startstop
lex_source	mark_line
lex_entirer  sliceidxr   rM   s   &&&&&&     r   _get_source SourceFileDescriptor._get_source  s     $--  A
 jHHQVVX&113$$Q	4!8<E&u-	;)+ F Fj88D>D$T[[]'KKK . !   s.   D
C6A;C6-C657C6,
D
6D		D
c           	         \         P                  ! R 4      pV P                  '       g   Vh\        V^4      pVf
   V^,           p RP	                  V P                  WW4V4      4      #   \         d    Thi ; i)zUnable to retrieve source coderF   )r   r   rl   maxr_   rR  OSError)r   rK  rL  rM  rN  rO  excs   &&&&&& r   r   SourceFileDescriptor.get_source  sv    ll;<}}}IE1<19D	99  jZPR R 	I	s   !A' 'A5)rl   r3  r   r   )NTr   F)rz   r{   ra   r|   rZ   r6  r@  rR  r   r}   r~   r   s   @r   r   r     s$     #
)
L, r"   r   c                   6   a a ] tR tRt oRtV 3R ltRtVtV ;t# )
CyGDBErrori2  z.
Base class for Cython-command related errors
c                R   < T;'       g    V P                   3p\        SV `  ! V!   R # r   )msgr   rZ   )r   r   r`   s   &*r   rZ   CyGDBError.__init__7  s#    ""{$r"   r#   )	rz   r{   ra   r|   __doc__rZ   r}   r~   r   r   s   @@r   rZ  rZ  2  s        r"   rZ  c                       ] tR tRtRtRtRtR# )r   i<  zQ
raised when the user requests the current cython function, which is
unavailable
z7Current function is a function cygdb doesn't know aboutr#   Nrz   r{   ra   r|   r^  r\  r}   r#   r"   r   r   r   <  s     DCr"   r   c                       ] tR tRtRtRtRtR# )r   iD  z]
raised when the name of the C function could not be determined
in the current C stack frame
zDC function name could not be determined in the current C stack framer#   Nr`  r#   r"   r   r   r   D  s    Cr"   r   c                   D   a a ] tR tRt oRtRV 3R lltR t]tRtVt	V ;t
# )CythonParameteriO  z"
Base class for cython parameters
c                   < V P                   P                  ;V n        V n        \        SV `  WV4       Ve	   W@n        R # R # r   )r`   r^  show_docset_docr   rZ   r   )r   r   command_classparameter_classdefaultr`   s   &&&&&r   rZ   CythonParameter.__init__T  s=    '+~~'='==.=	? J r"   c                ,    \        V P                  4      # r   )boolr   rv   s   &r   __bool__CythonParameter.__bool__[  s    DJJr"   )rf  re  r   r   )rz   r{   ra   r|   r^  rZ   rm  __nonzero__r}   r~   r   r   s   @@r   rc  rc  O  s     !  KKr"   rc  c                       ] tR tRtRtRtR# ) CompleteUnqualifiedFunctionNamesib  z@
Have 'cy break' complete unqualified function or method names.
r#   Nrz   r{   ra   r|   r^  r}   r#   r"   r   rq  rq  b      r"   rq  c                       ] tR tRtRtRtR# )ColorizeSourceCodeih  z-
Tell cygdb whether to colorize source code.
r#   Nrr  r#   r"   r   ru  ru  h  rs  r"   ru  c                       ] tR tRtRtRtR# )TerminalBackgroundin  zB
Tell cygdb about the user's terminal background (light or dark).
r#   Nrr  r#   r"   r   rw  rw  n  rs  r"   rw  c                   *   a  ] tR tRt o RtR tRtV tR# )CythonParametersit  z
Simple container class that might get more functionality in the distant
future (mostly to remind us that we're dealing with parameters).
c                    \        R \        P                  \        P                  R4      V n        \        R\        P                  \        P                  R4      V n        \        R\        P                  \        P                  R4      V n
        R# )cy_complete_unqualifiedTcy_colorize_codecy_terminal_background_colordarkN)rq  r   COMMAND_BREAKPOINTSPARAM_BOOLEANcomplete_unqualifiedru  COMMAND_FILESr:  rw  PARAM_STRINGr;  rv   s   &r   rZ   CythonParameters.__init__z  su    $D%##	%!
 0	
 $6*	$ r"   )r:  r  r;  N)rz   r{   ra   r|   r^  rZ   r}   r~   r   s   @r   ry  ry  t  s     
 r"   ry  c                   \   a  ] tR tRt o Rt]P                  t]R 4       t	]R 4       t
RtV tR# )CythonCommandi  z 
Base class for Cython commands
c                    \        V R 4      '       g   V ! WP                  .VO5/ VB # V ! WP                  V P                  .VO5/ VB # )completer_class)hasattrrg  r  )clsclsnamer   r   s   &&&&r   	_registerCythonCommand._register  sX    s-..w 1 1CDCFCCw 1 133F3F (( &( (r"   c                    \        V R R4      pV'       d   V P                  V P                  W4       V P                  V P                  W4      # )aliasN)rK   r  r  r   )r  r   r   r  s   &*, r   registerCythonCommand.register  s:    Wd+MM#))T2}}SXXt44r"   r#   N)rz   r{   ra   r|   r^  r   COMMAND_NONErg  classmethodr  r  r}   r~   r   s   @r   r  r    s=      $$M( ( 5 5r"   r  c                   j   a a ] tR tRt oRtRt]P                  t]P                  t
V 3R ltRtVtV ;t# )CyCyi  a  
Invoke a Cython command. Available commands are:

    cy import
    cy break
    cy step
    cy next
    cy run
    cy cont
    cy finish
    cy up
    cy down
    cy select
    cy bt / cy backtrace
    cy list
    cy print
    cy set
    cy locals
    cy globals
    cy exec
r   c           	     j  < \         \        V `  WVR R7       \        R/ R\        P                  4       bR\        P                  4       bR\        P                  4       bR\        P                  4       bR\        P                  4       bR\        P                  4       bR\        P                  4       bR	\        P                  4       bR
\        P                  4       bR\        P                  4       bR\        P                  4       bR\         P                  4       bR\"        P                  4       bR\$        P                  4       bR\&        P                  4       bR\(        P*                  ! RR4      bR\,        P                  4       bR\.        P                  4       bR\1        R4      bR\3        R4      bR\5        R4      bR\7        R4      b pVP9                  4        F  w  rVWn        \=        WV4       K  	  W n        / V n        / V n         / V n!        \D        PF                  ! \H        4      V n%        R# )T)rM   import_break_stepnextruncontfinishupdownr   btlistprint_r   rn   exec_zcy exec-cy-exec_execr   cy_cnamer   	cy_linenocy_evalNr#   )&r   r  rZ   dictCyImportr  CyBreakCyStepCyNextCyRunCyContCyFinishCyUpCyDownCySelectCyBacktraceCyListCyPrintCyLocals	CyGlobalsr   FixGdbCommandCyExecCySetCyCNameCyCValueCyLineCyEvalitemsr   setattrcython_namespacefunctions_by_qualified_namer   collectionsdefaultdictr  functions_by_name)r   r   rg  r  commandscommand_namecommandr`   s   &&&&   r   rZ   CyCy.__init__  s   mT+D,;D 	, 	J  
'')
 %%'
 ??$	

 ??$
 .."
 ??$
 &&(
 
 ??$
 &&(
 %%'
 ??$
 %%'
 &&(
   ((*!
" ++IzB#
$ OO%%
& .."'
, z*-
. !-/
0 {+1
2 Y'3
8 &.^^%5!LJD0 &6  !# ,.( #% "-!8!8!>r"   )r   r  r   r  r  )rz   r{   ra   r|   r^  r   r   r  rg  COMPLETE_COMMANDr  rZ   r}   r~   r   r   s   @@r   r  r    s1     , D$$M**O3? 3?r"   r  c                   |   a  ] tR tRt o RtRt]P                  t]P                  t
]P                  R 4       tRtV tR# )r  i  zV
Import debug information outputted by the Cython compiler
Example: cy import FILE...
z	cy importc           
        \        V\        4      '       d   VP                  \        4      p\	        V4       EF  p \        V4      p\        P                  ! T4      pTP                  4        EF  p\        R/ TP                  B pYP                  P                   TP"                  &   TP%                  R4       F.  p	T	P                  p
\'        R/ T
B TP(                  T
R,          &   K0  	  TP%                  R4       EFo  p\+        RRT/TP                  B pTP"                  pTP,                  pT P                  P.                  T,          P1                  T4       TT P                  P2                  TP,                  &   TT P                  P4                  TP6                  &   T;qP8                  T&   TP%                  R4       F.  pTP                  p
\'        R/ T
B TP:                  T
R,          &   K0  	  TP%                  R4       F1  pTP                  p
TP<                  P?                  T
R,          4       K3  	  TP@                  PC                  R	 TP%                  R
4       4       4       EKr  	  TP%                  R4       F  p\E        TP                  R,          4      pTP                  R,          p\G        \I        \D        TP                  R,          PK                  4       4      4      p\M        T4      TPN                  TT3&   T F  pTT3TPP                  T&   K  	  K  	  EK  	  EK  	  R#   \         d5   p\        P                  ! R T: RTP                  ^,          : 24      hRp?ii ; i)zUnable to open file r   NGlobalsr   	Functionsr   LocalsStepIntoFunctionsc              3   8   "   T F  qP                   x  K  	  R # 5ir   )tag)r   funcargs   & r   r   "CyImport.invoke.<locals>.<genexpr>/  s      5O3M3Mr   	ArgumentsLineNumberMapping
src_linenosrc_path	c_linenosr#   ))r?   r   decode_filesystemencodingr   rE  rV  r   r   r   r   parsegetrootrj   attribr   r  r   findr   rn   r   r   r  appendr  r   r   rq   r   r   addr   extendr   r  mapr   minro   rp   )r   r   from_ttyrP   r  etr   cython_modulevariabledr   cython_functionr   qnamelocalstep_into_funcmarkerr  r  r  c_linenos   &&&                   r   r   CyImport.invoke  s   dE"";;23D!$'CUI AA))+ , =v}} =?L((););< &I 6H A7E7J7JM))!F)4 !7 !'K 8H&4 'HM 'H7?'HO +//D+::EGG--d3::?K:I GG77'668 2A GG..'--/ :IHA//6!)x!8!LL<J<OQ<O..qy9 "9 +3--8K*L*11';;??&	J +M $--44 5O3;==3M5O O1 !96 %kk*=>F!$V]]<%@!AJ%}}Z8H $SfmmK.H.N.N.P%Q RIFI)nM--h
.BC$-?G>T11(; %. ?G & (  Ull4PQ#STTUs   L//M.:/M))M.r#   N)rz   r{   ra   r|   r^  r   r   COMMAND_STATUSrg  COMPLETE_FILENAMEr  r   dont_suppress_errorsr   r}   r~   r   s   @r   r  r    sA     
 D&&M++O##4U $4Ur"   r  c                      a  ] tR tRt o RtRt]P                  tR t	R t
]P                  R 4       t]P                  R 4       tRtV tR	# )
r  i;  a  
Set a breakpoint for Cython code using Cython qualified name notation, e.g.:

    cy break cython_modulename.ClassName.method_name...

or normal notation:

    cy break function_or_method_name...

or for a line number:

    cy break cython_module:lineno...

Set a Python breakpoint:
    Break on any function or method named 'func' in module 'modname'

        cy break -p modname.func...

    Break on any function or method named 'func'

        cy break -p func...
zcy breakc                   VP                  R 4      w  r#p\        V4      pV'       d   V P                  P                  V,          pMV P	                  4       P
                  pVP                  V3VP                  9   dR   VP                  VP                  V3,          pVP                  : R V: 2p\        P                  ! RV,           4       R# \        P                  ! R4      h)r   break z5Not a valid line number. Does it contain actual code?N)	partitionr   r   r  r   r   rl   ro   rm   r   r1   r   )r   r   
modulename_r   r  r  
breakpoints   &&      r   
_break_pyxCyBreak._break_pyxV  s     $s 3
vV GG44Z@M 446==M""F+}/H/HH$001G1G1OPH$1$<$<hGJKK:-.,,  > ? ?r"   c                r   V P                   P                  P                  V4      pV'       d   VP                  '       d   R pV.pV'       Egh   V P                   P                  P                  V4      ;'       g    . pV Uu. uF  qUP                  '       d   K  VNK  	  ppV'       g    \
        P                  ! RV,           4       R # \        V4      ^8  d   \        R4       \        V4       F"  w  rb\        RWbP                  3,          4       K$  	    \        R4      pVP                  4       R8X  d   R # VP                  4       R8X  d   TpMeVP                  4       '       d9   ^ \        V4      u;8:  d   \        V4      8  d   M MV\        V4      ,          .pM\        R4       K  V^ ,          .pV Fe  p\
        P                  ! RVP                   ,          4       VP"                  '       g   K>  \
        P                  ! RVP"                  ,          4       Kg  	  R # u upi   \         d     R # i ; i)	Nr  z"There are multiple such functions:z%3d) %szMSelect a function, press 'a' for all functions or press 'q' or '^D' to quit: qr
  zNot understood...zbreak %s)r   r  r'   r   r  r   r1   lenr   rJ  r   inputlowerisdigitr   EOFErrorr   r   )r   funcnamefuncbreak_funcsfuncsr  rQ  r   s   &&      r   _break_funcnameCyBreak._break_funcnamef  s   ww2266x@D///DftGG--11(;AArE %F1-E-EQQEFHx/05zA~:;!*5!1IC)s,?,?&@@A "2 7!&G"H "<<>S0"#\\^s2*/K!$nn.. !S[ =3u: =+0V+=*>K!!"56$QxjDKK
TZZ/0}}}J67  E G" $ s   H"H"H' 'H65H6c                r   \        V\        4      '       d   VP                  \        4      p\	        V4      pVP                  R 4      '       d   VR,          pRpMRpV FU  pV'       d    \        P                  ! RV,          4       K*  RV9   d   V P                  V4       KD  V P                  V4       KW  	  R# )z-p:r+  NNTFzpy-break %sr   N)
r?   r   r  r  r   r   r   r1   r  r
  )r   function_namesr  argvpython_breakpointsr  s   &&&   r   r   CyBreak.invoke  s    ne,,+223FGNn-$$T**8D!%!&H!MH45)$$X. r"   c                :   T;'       g    R pV P                   P                  P                  4        UUu. uFC  w  r4\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       g   KA  VNKE  	  pppV P                   P                  P                  4        UUu. uF  w  r6VP
                  '       d   K  VNK  	  ppp\        P                  '       d   \        P                  ! Wu4      pMTpVP                  4       P                  4       p	V	'       d   RV	R,          9  dZ   \        VR\        V4      )  P                  4       4      p
V Uu. uF&  pVP                  V4      '       g   K  W:9  g   K$  VNK(  	  up# V	R,          pV Uu. uF  q3P                  V4      '       g   K  VNK  	  pp\        V4      \        V4      8  d/   \        V4      \        V4      ,
          pV Uu. uF  q3VR NK	  	  ppV# u uppi u uppi u upi u upi u upi )rT   c              3   B   "   T F  qP                   '       * x  K  	  R # 5ir   )r   )r   r  s   & r   r   #CyBreak.complete.<locals>.<genexpr>  s     Aq!5555qs   TF.N)r   r  r  anyr  r   r[   r  rH  chainstripr   r   r  r   )r   textwordnLnamesr  qnames	all_nameswordsr  lastwordcomplstrip_prefix_lengths   &&&           r   completeCyBreak.complete  s    zzr !% 9 9 ? ? A C ASAqASSSAqAA ! A C $ C C I I K 3 K11 ! K 3 ***!6II

""$59,tKc$iZ(..01D( Cy!\\$/ 45M Ay C C 9"=Fqll8&<F=x=3t9$ #&h-#d)";6;<e*+,eE<7C3C
 > =sA   #HH7H'HHH6H>HH1H1Hr#   N)rz   r{   ra   r|   r^  r   r   r  rg  r  r
  r   r  r   r$  r}   r~   r   s   @r   r  r  ;  s[     . D++M? /8b ##/ $/$ ##  $ r"   r  c                   Z   a a ] tR tRt oRtV 3R ltV 3R ltV 3R ltR tR t	Rt
VtV ;t# )	
CythonInfoi  zE
Implementation of the interface dictated by libpython.LanguageInfo.
c                   < V P                  V4      '       d   V P                  V4      ^,          # \        SV `  V4      # r+  )r(   r   r   r   r   r   r`   s   &&r   r   CythonInfo.lineno  s;    
 ""5))))%033w~e$$r"   c                   <  \         SV `  V4      pVP                  4       ;'       g    R #   \        P                   d     R # i ; ir   )r   r   r  r   r   )r   r   r   r`   s   && r   r   CythonInfo.get_source_line  sE    	(7*51D ::<''4' || 		s   , AAc                J   < V P                   '       d   \        SV `	  V4      # R # r   )r0   r   exc_infor*  s   &&r   r/  CythonInfo.exc_info  s$    """7#E** #r"   c                f    V P                  4       '       d   V P                  4       P                  # R# )Nr#   )r(   r   r   rv   s   &r   runtime_break_functions"CythonInfo.runtime_break_functions  s+    ""$$++-AAA	r"   c                V    R .pVP                  V P                  P                  4       V# )r   )r  r   r   )r   r   s   & r   static_break_functions!CythonInfo.static_break_functions  s%    &'dgg001r"   r#   )rz   r{   ra   r|   r^  r   r   r/  r2  r5  r}   r~   r   r   s   @@r   r'  r'    s(     %(+
 r"   r'  c                   0   a  ] tR tRt o ]R 4       tRtV tR# )CythonExecutionControlCommandi  c                0    V ! V P                   \        4      # r   )r   cython_info)r  s   &r   r  &CythonExecutionControlCommand.register  s    388[))r"   r#   N)rz   r{   ra   r|   r  r  r}   r~   r   s   @r   r8  r8    s      * *r"   r8  c                   P   a  ] tR tRt o RtRtRt]P                  R 4       t	Rt
V tR# )r  i  z&Step through Cython, Python or C code.zcy -stepTc                P   V P                  4       '       d   V P                  V P                  4       R# V P                  4       '       gA   V P                  '       d   R pMRpV P	                  \
        P                  ! VRR7      4       R# V P                  V P                  R7       R# )r  r  T	to_string)stepintoN)r0   python_stepr@  r(   finish_executingr   r1   r  )r   r   r  r  s   &&& r   r   CyStep.invoke  sp    ""$$T]]+((**}}}  !!#++g"FGIIt}}I-r"   r#   N)rz   r{   ra   r|   r^  r   r@  r   r  r   r}   r~   r   s   @r   r  r    s*     ,DH##. $.r"   r  c                   "    ] tR tRtRtRtRtRtR# )r  i  z#Step-over Cython, Python or C code.zcy -nextFr#   N)rz   r{   ra   r|   r^  r   r@  r}   r#   r"   r   r  r    s    )DHr"   r  c                   V    ] tR tRtRtRt]P                  ! ]P                  4      t
RtR# )r  i  zu
Run a Cython program. This is like the 'run' command, except that it
displays Cython or Python source lines as well
zcy runr#   N)rz   r{   ra   r|   r^  r   r   r  r8  r  r   r}   r#   r"   r   r  r    s%    
 D++,I,M,MNFr"   r  c                   V    ] tR tRtRtRt]P                  ! ]P                  4      t
RtR# )r  i"  z{
Continue a Cython program. This is like the 'run' command, except that it
displays Cython or Python source lines as well.
zcy contr#   N)rz   r{   ra   r|   r^  r   r   r  r8  r  r   r}   r#   r"   r   r  r  "  s%    
 D++,I,N,NOFr"   r  c                   V    ] tR tRtRtRt]P                  ! ]P                  4      t
RtR# )r  i,  z%
Execute until the function returns.
z	cy finishr#   N)rz   r{   ra   r|   r^  r   r   r  r8  r  r   r}   r#   r"   r   r  r  ,  s%     D++,I,P,PQFr"   r  c                   P   a  ] tR tRt o RtRtRt]P                  R 4       t	Rt
V tR# )r  i5  z-
Go up a Cython, Python or relevant C frame.
zcy upr  c                    \         P                  ! V P                  R R7       V P                  \         P                  ! 4       4      '       g%   \         P                  ! V P                  R R7       KN   \         P                  ! 4       p^ pT'       d   TP                  4       pT^,          pK#  T P                  T^,
          R7       R#   \
         d$   p\         P                  ! TP                  !  hRp?ii ; i)Tr>  N)r  )
r   r1   _commandr2   r   r   r   r   r   r   )r   r   r  r   r  s   &*   r   r   CyUp.invoke<  s    	(KK6//0B0B0DEEDMMT: F
 ""$KKMEQJEEAI.  	(,,''	(s   AC $C C6C11C6r#   N)rz   r{   ra   r|   r^  r   rJ  r   r  r   r}   r~   r   s   @r   r  r  5  s.      DH##/ $/r"   r  c                   "    ] tR tRtRtRtRtRtR# )r  iN  z/
Go down a Cython, Python or relevant C frame.
zcy downr  r#   N)rz   r{   ra   r|   r^  r   rJ  r}   r#   r"   r   r  r  N  s     DHr"   r  c                   L   a  ] tR tRt o RtRt]P                  R 4       tRt	V t
R# )r  iW  z
Select a frame. Use frame numbers as listed in `cy backtrace`.
This command is useful because `cy backtrace` prints a reversed backtrace.
z	cy selectc                    \        V4      p\        P                  ! 4       pTP                  4       '       d   TP                  4       pK(  \        P                  ! T4      p \        P                  ! RYA,
          ^,
          3,          4       R#   \         d    \        P                  ! R T: 24      hi ; i  \         d$   p\        P                  ! TP                  !  hRp?ii ; i)zNot a valid number: z	select %dN)r   
ValueErrorr   r   r   newerr   
stackdepthr1   r   r   )r   stacknor  r   rQ  r  s   &&&   r   r   CySelect.invoke_  s    	F'lG ""$kkmmKKME))%0
	(KKz';a'?&AAB  	F,,7DEE	F  	(,,''	(s#   B !+B7 &B47C%C  C%r#   N)rz   r{   ra   r|   r^  r   r   r  r   r}   r~   r   s   @r   r  r  W  s)     
 D##( $(r"   r  c                      a  ] tR tRt o RtRtRt]P                  t	]P                  t]P                  ]R 4       4       tRtV tR# )r  ir  zPrint the Cython stackzcy btzcy backtracec                `   \         P                  ! 4       pVP                  4       '       d   VP                  4       pK(  VR 8H  p^ pV'       dO    V P                  V4      pV'       g	   V'       d   V P                  W54       V^,          pVP                  4       pKV  R#   \         d    Rp LMi ; i)z-aFN)r   r   r   r2   rZ  r   rP  )r   r   r  r   	print_allr  is_relevants   &&&    r   r   CyBacktrace.invokez  s     ""$kkmmKKMEDL	$"77> K%%e3QJEKKME   $#$s   B B-,B-r#   N)rz   r{   ra   r|   r^  r   r  r   COMMAND_STACKrg  COMPLETE_NONEr  r   r  r*   r   r}   r~   r   s   @r   r  r  r  sH     DE%%M''O##"  $"r"   r  c                   |   a  ] tR tRt o RtRt]P                  t]P                  t
]P                  R 4       tRtV tR# )r  i  zU
List Cython source code. To disable to customize colouring see the cy_*
parameters.
zcy listc                    V P                  4       w  r4VP                  V^,
          V^,           VRR7      p\        V4       R# )   T)rN  rO  N)r   r   r   )r   r  r  sdr   sources   &&&   r   r   CyList.invoke  s?     ))+
vz6A:*.  0fr"   r#   N)rz   r{   ra   r|   r^  r   r   r  rg  rZ  r  r   r  r   r}   r~   r   s   @r   r  r    s?     
 D%%M''O## $r"   r  c                   j   a  ] tR tRt o RtRt]P                  t]	P                  R 4       tR tRtV tR# )r  i  zL
Print a Cython variable using 'cy-print x' or 'cy-print module.function.x'
zcy printc                   V P                  4       pV P                  4       P                  P                  pW9   d:   W1,          P	                  \
        P                  4      p\        V: R V: 24       R# W9   dc   WA,          P                  p \        P                  ! V4      pVP                  '       g   V P                  W4       R# \        RV,          4       R# V P                  4       '       d   \        P                  ! RV,           4      # V P!                  4       '       dj   V P"                  P$                  P'                  VP)                  R4      4      pV F  pVR8X  d   VP+                  4       pK   M	  V P                  W4       R# \        P                  ! RV,           4       R#   \         d    \        RT,          4        R# i ; i)rH   z%s is optimized outzunable to get value of %sz	py-print *zprint N)r"  r   r   rn   get_truncated_reprr   MAX_OUTPUT_LENr   r   r   r   r   r(  r   r0   r1   r(   r   r   r   lstripdereference)r   r   r  global_python_dictmodule_globalsr   r   cs   &&&     r   r   CyPrint.invoke  sb   !99;113::BB%&,??	@X@XYEtU+, #"(..E8**51 ---((5/$67$$&&;;{T122$$&&GG%%,,T[[-=>E8!--/E	    -KK4('   :1D89:s   F- -GGc                    V P                  4       '       dE   V P                  4       p\        \        P                  ! VP
                  VP                  4      4      # . # r   )r(   r   r  rH  r  r   rn   )r   r  s   & r   r$  CyPrint.complete  sB    ""$$((*A	!))<==Ir"   r#   N)rz   r{   ra   r|   r^  r   r   COMMAND_DATArg  r   r  r   r$  r}   r~   r   s   @r   r  r    s?      D$$M## ) $ )D r"   r  c                 0    V ^ ,          P                  4       # )r   )r  )items   &r   r   r     s    tAw}}r"   c                      a  ] tR tRt o RtRt]P                  t]P                  t
]P                  ]! RRR7      R 4       4       tRtV tR	# )
r  i  z0
List the locals from the current Cython frame.
z	cy localszinfo localsz	py-localsr5   r6   c                <   V P                  4       pVP                  '       d(   V P                  P                  P	                  W4       R # VP
                  p\        \        V\        R7      4      p\        VP                  4       \        R7       F  w  rgV P                  V P                  4       VP                  4      '       g   K7  \        P                  ! VP                  4      pVP                   '       d   Kk  V P#                  VP                  VVR4       K  	  R # )NkeyrT   )r   r   r   rn   r   r   r  rU  r\   r  sortkeyr/  r   r   r   r   r   r(  )	r   r   r  r  local_cython_varsr&  r   r-  r   s	   &&&      r   r   CyLocals.invoke  s     224111GGOO""42+22c"3=>!"3"9"9";IKD""4#;#;#=uzzJJ**5;;7---((U)8">	 Jr"   r#   Nrz   r{   ra   r|   r^  r   r   rY  rg  rZ  r  r   r  r9   r   r}   r~   r   s   @r   r  r    sO      D%%M''O##{K> L $>r"   r  c                      a  ] tR tRt o RtRt]P                  t]P                  t
]P                  ]! RRR7      R 4       4       tRtV tR	# )
r  i  z2
List the globals from the current Cython module.
z
cy globalszinfo variablesz
py-globalsrr  c                J   V P                  4       pV P                  4       P                  P                  p^ p^ pV'       d   \	        \        V\        R7      4      pV'       d   \	        \        V4      4      p\        WV4      p\        4       p\        R4       \        VP                  4       \        R7       FI  w  rV
P                  \        P                  4      p
VP                  V	4       \        RWyV
3,          4       KK  	  \        R4       \        VP                  4       \        R7       F`  w  rW9  g   K   \        P                   ! VP"                  4      pVP$                  '       g!   V P'                  VP(                  VVR4       K`  Kb  	  R#   \*         d     Kt  i ; i)r   rt  zPython globals:z    %-*s = %sz
C globals:r   N)r"  r   r   rn   r  rU  r   r   r\   r  rv  rd  r   re  r  r   r   r   r   r(  r   r   )r   r   r  rh  ri  max_globals_lenmax_globals_dict_lenr&  r  r   r!  r   r-  r   s   &&&           r   r   CyGlobals.invoke   sU    "99;113::BB !#n#">?O#&s+='>#? oDu -3357CDA$$Y%=%=>AHHQK/_$;;< D
 	l!."6"6"8gFKDF..u{{;E !111,,UZZ-<fF 2 G $ s   ; FF"!F"r#   Nry  r   s   @r   r  r    sR      D%%M''O##!1,OF P $Fr"   r  c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	EvaluateOrExecuteCodeMixini$  z
Evaluate or execute Python code in a Cython or Python frame. The 'evalcode'
method evaluations Python code, prints a traceback if an exception went
uncaught, and returns any return value as a gdb.Value (NULL on exception).
c                   V P                  4       pVP                  P                  4        F  w  rEVP                  \        8X  g   K  V P                  W44      '       g   K5   \        P                  ! VP                  4      pVP                  '       d   Kj   TP                  T4      pRY'TP                  3,          p \        P                  ! T4      ^ 8  d-   \        P                  ! R4       \        P                  ! R4      h TP                  T4       K  	  R#   \         d     K  i ; i  TP                  T4       i ; i)zBFill a remotely allocated dict with values from the Cython C stackz
                    (PyObject *) PyDict_SetItem(
                        (PyObject *) %d,
                        (PyObject *) %d,
                        (PyObject *) %s)
                zPyErr_Print()zUnable to execute Python code.N)r   r   r  r   r   r/  r   r   r   r   r   alloc_pystringr   xdecref)	r   executorlocal_dict_pointerr   r   r-  r   	pystringpr?  s	   &&&      r   _fill_locals_dict,EvaluateOrExecuteCodeMixin._fill_locals_dict+  s   ..0&--335KD

l*++K>>!,,U[[9C +++  , %33D9	
 *ekkBC0))$/!3**?;!ll+KLL 4
 $$Y/5 6 $ ( $$Y/s   ! D=AD.D+*D+.Ec                   \         P                  ! 4       pV'       dS   V P                  V4      '       g   V P                  V4      '       d   VP	                  4        V# VP                  4       pKZ  \         P                  ! R 4      h)z0There is no Cython or Python frame on the stack.)r   r   r(   r0   r   r   r   r   s   & r   "_find_first_cython_or_python_frame=EvaluateOrExecuteCodeMixin._find_first_cython_or_python_frameK  s^    ""$''....u55KKMEllMNNr"   c           	        \         P                  ! 4       ;_uu_ 4        \        P                  ! R 4      p\        P                  ! R4      p V P	                  V\         P
                  ! V4      4       VP                  W#VV4      pVP                  \         P
                  ! V4      4        RRR4       V#   TP                  \         P
                  ! T4      4       i ; i  + '       g   i     X# ; i)z&(PyObject *) PyModule_GetDict(__pyx_m)z(PyObject *) PyDict_New()N)r   FetchAndRestoreErrorr   r   r  pointervalueevalcoder  )r   r  r?  
input_typeglobal_dict
local_dictr   s   &&&&   r   _evalcode_cython+EvaluateOrExecuteCodeMixin._evalcode_cythonW  s    ++-- ,,8:K++,GHJE&&x'0'='=j'IK!**4[+57   !7!7
!CD .    !7!7
!CD .- s#   -C9B5%C5'CCC0	c                    V P                  4       p\        P                  ! 4       pV P                  V4      '       d   \        P                  ! WAV4      # V P                  WAV4      # )zQ
Evaluate `code` in a Python or Cython stack frame using the given
`input_type`.
)r  r   PythonCodeExecutorr0   _evalcode_pythonr  )r   r?  r  r   r  s   &&&  r   r  #EvaluateOrExecuteCodeMixin.evalcodei  sW    
 779//1""5))--hjII$$XZ@@r"   r#   N)rz   r{   ra   r|   r^  r  r  r  r  r}   r~   r   s   @r   r  r  $  s'     0@
O$	A 	Ar"   r  c                   |   a  ] tR tRt o RtRt]P                  t]P                  t
]P                  R 4       tRtV tR# )r  iu  z<
Execute Python code in the nearest Python or Cython frame.
r  c                    V P                  V4      w  r\        P                  ! 4       pVP                  V P	                  WP
                  4      4       R # r   )readcoder   r  r  r  Py_file_input)r   exprr  r  r  s   &&&  r   r   CyExec.invoke~  s>    ==.//1t-C-CDEr"   r#   N)rz   r{   ra   r|   r^  r   r   rY  rg  rZ  r  r   r  r   r}   r~   r   s   @r   r  r  u  sA      D%%M''O##F $Fr"   r  c                      a  ] tR tRt o RtRt]P                  t]P                  t
]P                  ]R 4       4       tRtV tR# )r  i  z
Set a Cython variable to a certain value

    cy set my_cython_c_variable = 10
    cy set my_cython_py_variable = $cy_eval("{'doner': 'kebab'}")

This is equivalent to

    set $cy_value("my_cython_variable") = 10
zcy setc                    VP                  R ^4      p\        V4      ^8w  d   \        P                  ! R4      hVw  rAV P                  P
                  P                  VP                  4       4      p\        P                  ! RV: RV: 24       R# )r   z,Invalid expression. Use 'cy set var = expr'.zset rH   N)	r   r  r   r   r   r  r   r  r1   )r   r  r  name_and_exprvarnamer   s   &&&   r   r   CySet.invoke  si     

3*}",,MNN%  ''8UD12r"   r#   N)rz   r{   ra   r|   r^  r   r   rn  rg  rZ  r  r   r  r,   r   r}   r~   r   s   @r   r  r    sG     	 D$$M''O##3  $3r"   r  c                   `   a  ] tR tRt o Rt]P                  ]]RR l4       4       4       t	Rt
V tR# )r  i  z
Get the C name of a Cython variable in the current context.
Examples:

    print $cy_cname("function")
    print $cy_cname("Class.method")
    print $cy_cname("module.function")
Nc                   T;'       g    \         P                  ! 4       pR pV P                  V4      '       d   V P                  V4      pWP                  9   d   VP                  V,          P
                  pMWP                  P                  9   d)   VP                  P                  V,          P
                  pM^VP                  P                  : RV: 2pWTP                  P                  9   d(   VP                  P                  V,          P
                  pV'       g&   V P                  P                  P                  V4      pV'       g   \         P                  ! RV,          4      hV# )Nr  zNo such Cython variable: %s)r   r   r(   r   r   r   r   rn   r   rq   r   r  r'   r   )r   cynamer   r   r  r  s   &&&   r   r   CyCName.invoke  s    --++-""5))"66u=O///'..v6<<11999'..66v>DD#2#9#9#>#>G22<<<+22<<UCIIEGG77;;FCE,,<vEFFr"   r#   r   )rz   r{   ra   r|   r^  r   r  r,   rC   r   r}   r~   r   s   @r   r  r    s4      ##" #  $r"   r  c                   l   a a ] tR tRt oRt]P                  ]]RV 3R ll4       4       4       t	Rt
VtV ;t# )r  i  z%
Get the value of a Cython variable.
c                *  < V P                  4       pV P                  V4      pV P                  WA4      '       d'   \        SV `  WR 7      p\
        P                  ! V4      # W9   d   W1,          P                  # \
        P                  ! RV,          4      h)r   zVariable %s is not initialized.)	r"  r   r/  r   r   r   r   _gdbvalr   )r   r  r   globals_dictr  r   r`   s   &&&   r   r   CyCValue.invoke  s     335225977GN6N7E%%e,,#'///,,@6IJJr"   r#   r   )rz   r{   ra   r|   r^  r   r  r,   rC   r   r}   r~   r   r   s   @@r   r  r    s<      ##"
K #  $
K 
Kr"   r  c                   R   a  ] tR tRt o Rt]P                  ]R 4       4       tRt	V t
R# )r  i  z
Get the current Cython line.
c                0    V P                  4       ^,          # r)  )r   rv   s   &r   r   CyLine.invoke  s     %%'**r"   r#   N)rz   r{   ra   r|   r^  r   r  r,   r   r}   r~   r   s   @r   r  r    s,      ##+  $+r"   r  c                   R   a  ] tR tRt o Rt]P                  ]R 4       4       tRt	V t
R# )r  i  zG
Evaluate Python code in the nearest Python or Cython frame and return
c                X    \         P                  P                  pV P                  W4      # r   )r   r  Py_eval_inputr  )r   python_expressionr  s   && r   r   CyEval.invoke  s%     11??
}}.;;r"   r#   N)rz   r{   ra   r|   r^  r   r  rC   r   r}   r~   r   s   @r   r  r    s,      ##"< # $<r"   r  c                      \         P                  ! \        P                  ! R 4      \        P
                  \        P
                  3,          4       R# )z        define cy step
        cy -step
        end

        define cy next
        cy -next
        end

        document cy step
        %s
        end

        document cy next
        %s
        end
    N)r   source_gdb_scriptr  r  r  r^  r  r#   r"   r   register_definesr    s7     1 !	  NNFNN+!!, -r"   )Tr   )NT>   Frame.pc
Frame.name
Frame.typeFrame.blockFrame.levelFrame.newerFrame.olderFrame.selectSymbol.valueFrame.find_salFrame.functionFrame.is_validFrame.languageSymbol.is_validSymtab.fullnameSymtab.is_validSymtab.linetableFrame.static_linkFrame.architectureSymtab.global_blockSymtab.static_blockSymtab_and_line.is_valid)[r^  r   r  r   rH  r  r   lxmlr   	have_lxmlImportError	xml.etreer   pygments.lexersr   pygments.formattersstderrr  r  r   shlexr   Cython.Debuggerr   r   r   r  _data_typesgetfilesystemencodingr  r$   r,   r9   r*   rC   rh   rj   r   r   r   r   r   r   r   rZ  r   r   	Parameterrc  rq  ru  rw  ry  r[   Commandr  r  r  r  
PythonInfor'  ExecutionControlCommandBaser8  PythonStepperMixinr  r  r  r  r  r  r  r  r  r  r  rv  r  r  r  PyExecr  r  Functionr  r  r  r  r:  r  r   r  r#   r"   r   <module>r     sc  
      
I
F
 3 !!"- % 7>//1<<W 
"	*	.bO O 
! 
!)^ )2 2>Y) Y)x: :~   D: D!= cmm &    . 

5CKK 50N?= N?b?U} ?UDPm Pf"Y11 "J*M$-$I$I*.*I,H,H .*V O) OP* PR, R/= /2T (} (6"- "@] &0m 0f '>} >8*F *FZNA NAbF]I,,.H F 3M 3<"cllJ "JKw K*+S\\: +	<S\\:'A 	< l	]]_-&  w/  .I  FHJJDEFs"   K  K6  K32K36$LL