
    
h                         S r SSKrSSKJrJrJr  SSKJrJrJ	r	   " S S\R                  5      r
 " S S	\R                  5      r " S
 S5      r " S S5      rg)z\Support for stack-frames.

Provides Implements a nearly complete wrapper for a stack frame.
    N   )axdebugexpressionsgateways)RaiseNotImpl_wraptracec                   *    \ rS rSrSrS rS rS rSrg)EnumDebugStackFrames   z[A class that given a debugger object, can return an enumerator
of DebugStackFrame objects.
c                    / nUR                   nU(       a  UR                  R                  UR                  R                  5      nUbB   UR
                  S   n[        X3R                  S-
  U5      UUS-   SS 4nUR                  U5        UR                  nU(       a  M  [        R                  R                  XS5        g ! [         a    [        R                  " 5       n Nf = f)N__axstack_address__r   r   )currentframecodeContainerProviderFromFileNamef_codeco_filenamef_localsKeyErrorr   GetStackAddressDebugStackFramef_linenoappendf_backr   r   __init__)selfdebuggerinfosframeccaddress	frameInfos          qC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\win32comext/axdebug/stackframe.pyr   EnumDebugStackFrames.__init__   s    %% //<<U\\=U=UVB~8#nn-BCG $E>>A+=rBaK	 Y' LLE/ e2 	%%..tA>#   8 &557G8s   	C   C"!C"c                 @    [         R                  R                  X5      $ N)r   r   Next)r   counts     r#   r'   EnumDebugStackFrames.Next6   s    ,,11$>>    c                     Uu  p#pEn[        U[        R                  5      nU(       a  [        U[        R                  5      nX#XEU4$ r&   )r   r   IID_IDebugStackFrame	pythoncomIID_IUnknown)r   objobFrameminlimfFinalobFinals          r#   r   EnumDebugStackFrames._wrap=   sB    -0*c7!=!=>GY%;%;<GS'11r*    N)	__name__
__module____qualname____firstlineno____doc__r   r'   r   __static_attributes__r6   r*   r#   r   r      s    ?D?2r*   r   c                   >    \ rS rSrS rS rS rS rS rS r	S r
S	rg
)r   F   c                 6    Xl         X l        X0l        S U l        g r&   )r   linenocodeContainerexpressionContext)r   r   r@   rA   s       r#   r   DebugStackFrame.__init__G   s    
*!%r*   c                     U[         R                  :X  aV  U R                  c=  [        [        R
                  " U R                  5      [         R                  5      U l        U R                  $ g)Nr   )r   IID_IDebugExpressionContextrB   r   r   ExpressionContextr   )r   iids     r#   _query_interface_!DebugStackFrame._query_interface_O   sW    '555%%-).11$**=77*& ))) r*   c                     [        S5        g)z_Returns the thread associated with this stack frame.

Result must be a IDebugApplicationThread
	GetThreadNr   r   s    r#   rK   DebugStackFrame.GetThread]   s    
 	[!r*   c                     U R                   R                  U R                  5      nU R                   R                  U5      $ r&   )rA   GetPositionOfLiner@   GetCodeContextAtPosition)r   offsets     r#   GetCodeContextDebugStackFrame.GetCodeContextd   s3    ##55dkkB!!::6BBr*   c                     U R                   R                  R                  nSn U R                   R                  R                  (       a$  X0R                   R                  R                  -  nU$ US-  nU$ )N z<lambda>)r   r   r   co_name)r   fLongfilenamess       r#   GetDescriptionString$DebugStackFrame.GetDescriptionStringj   sa    ::$$00::$$""***A  OAr*   c                     U(       a  gg)NzPython ActiveX Scripting EnginePythonr6   )r   rX   s     r#   GetLanguageString!DebugStackFrame.GetLanguageStringu   s    4r*   c                 \    [        [        U R                  5      [        R                  5      $ r&   )r   StackFrameDebugPropertyr   r   IID_IDebugPropertyrM   s    r#   GetDebugProperty DebugStackFrame.GetDebugProperty{   s    ,TZZ8':T:TUUr*   )rA   rB   r   r@   N)r7   r8   r9   r:   r   rH   rK   rS   r[   r_   rd   r<   r6   r*   r#   r   r   F   s'    &
"C	Vr*   r   c                   @    \ rS rSrS/r\R                  /rS rS r	Sr
g)DebugStackFrameSniffer   EnumStackFramesc                 &    Xl         [        S5        g )Nz#DebugStackFrameSniffer instantiated)r   r	   )r   r   s     r#   r   DebugStackFrameSniffer.__init__   s     34r*   c                 r    [        S5        [        [        U R                  5      [        R
                  5      $ )Nz-DebugStackFrameSniffer.EnumStackFrames called)r	   r   r   r   r   IID_IEnumDebugStackFramesrM   s    r#   ri   &DebugStackFrameSniffer.EnumStackFrames   s,    => /1R1R
 	
r*   )r   N)r7   r8   r9   r:   _public_methods_r   IID_IDebugStackFrameSniffer_com_interfaces_r   ri   r<   r6   r*   r#   rg   rg      s$    )*;;<5
r*   rg   c                   Z    \ rS rSr\R
                  /r/ SQrS rS r	S r
S rS rS rS	rg
)rb      )GetPropertyInfoGetExtendedInfoSetValueAsStringEnumMembers	GetParentc                     Xl         g r&   r   )r   r   s     r#   r    StackFrameDebugProperty.__init__   s    
r*   c                     [        S5        g )Nz(StackFrameDebugProperty::GetPropertyInforL   )r   dwFieldSpecnRadixs      r#   rt   'StackFrameDebugProperty.GetPropertyInfo       ?@r*   c                     [        S5        g )Nz(StackFrameDebugProperty::GetExtendedInforL   rM   s    r#   ru   'StackFrameDebugProperty.GetExtendedInfo   r   r*   c                     [        S5        g )NzDebugProperty::SetValueAsStringrL   )r   valueradixs      r#   rv   (StackFrameDebugProperty.SetValueAsString   s    67r*   c                     [        SXU5        SSKJn  UR                  " U R                  R
                  XX0R                  5      $ )Nrw   r   )r   )printrV   r   MakeEnumDebugPropertyr   r   )r   r}   r~   rG   r   s        r#   rw   #StackFrameDebugProperty.EnumMembers   s9    m[#6!00JJc::
 	
r*   c                     [        S5        g )NzDebugProperty::GetParentrL   rM   s    r#   rx   !StackFrameDebugProperty.GetParent   s    /0r*   rz   N)r7   r8   r9   r:   r   rc   rq   ro   r   rt   ru   rv   rw   rx   r<   r6   r*   r#   rb   rb      s9    223AA8
1r*   rb   )r;   r-   rV   r   r   r   utilr   r   r	   r   r   rg   rb   r6   r*   r#   <module>r      sW   
  , , , ,42888 42n6Vh.. 6Vr
 
$!1 !1r*   