oidZddlZddlmZmZmZddlmZmZm Z Gddej Z Gdd ej Z Gd d Z Gd d Z dS)z\Support for stack-frames. Provides Implements a nearly complete wrapper for a stack frame. N)axdebug expressionsgateways) RaiseNotImpl_wraptracec$eZdZdZdZdZdZdS)EnumDebugStackFrameszcA class that given a debugger object, can return an enumerator of DebugStackFrame objects. cg}|j}|r|j|jj}|h |jd}n##t $rtj}YnwxYwt||j dz |||dzddf}| ||j }|tj||ddS)N__axstack_address__rr) currentframecodeContainerProvider FromFileNamef_code co_filenamef_localsKeyErrorrGetStackAddressDebugStackFramef_linenoappendf_backrr __init__)selfdebuggerinfosframeccaddress frameInfos NC:\PYTHON\Scheduler\python\Lib\site-packages\win32comext/axdebug/stackframe.pyrzEnumDebugStackFrames.__init__s% !/<A+=rBBaK   Y'''LE/ !2 %..tUA>>>>>s AA! A!cBtj||SN)rr Next)rcounts r"r%zEnumDebugStackFrames.Next6s,11$>>>c|\}}}}}t|tj}|rt|tj}|||||fSr$)rrIID_IDebugStackFrame pythoncom IID_IUnknown)robjobFrameminlimfFinalobFinals r"rzEnumDebugStackFrames._wrap=sO-0*c67!=>>  =GY%;<||_||_||_d|_dSr$)rlineno codeContainerexpressionContext)rrr9r:s r"rzDebugStackFrame.__init__Gs&  *!%r'c|tjkrD|j6tt j|jtj|_|jSdS)Nr)rIID_IDebugExpressionContextr;rrExpressionContextr)riids r"_query_interface_z!DebugStackFrame._query_interface_OsS '5 5 5%-).1$*==7**&) )qr'c$tddS)zoReturns the thread associated with this stack frame. Result must be a IDebugApplicationThread GetThreadNrrs r"rBzDebugStackFrame.GetThread]s [!!!!!r'ct|j|j}|j|Sr$)r:GetPositionOfLiner9GetCodeContextAtPosition)roffsets r"GetCodeContextzDebugStackFrame.GetCodeContextds1#55dkBB!::6BBBr'c|jjj}d} |jjjr||jjjz }n|dz }|S)Nrz)rrrco_name)rfLongfilenamess r"GetDescriptionStringz$DebugStackFrame.GetDescriptionStringjsK:$0   :  $  "* *AA OAr'c|rdSdS)NzPython ActiveX Scripting EnginePythonr6)rrMs r"GetLanguageStringz!DebugStackFrame.GetLanguageStringus  448r'cZtt|jtjSr$)rStackFrameDebugPropertyrrIID_IDebugPropertyrDs r"GetDebugPropertyz DebugStackFrame.GetDebugProperty{s ,TZ88':TUUUr'N) r2r3r4rr@rBrIrPrSrWr6r'r"rrFs&&&   """CCC    VVVVVr'rc0eZdZdgZejgZdZdZdS)DebugStackFrameSnifferEnumStackFramesc2||_tddS)Nz#DebugStackFrameSniffer instantiated)rr )rrs r"rzDebugStackFrameSniffer.__init__s   344444r'cxtdtt|jtjS)Nz-DebugStackFrameSniffer.EnumStackFrames called)r rr rrIID_IEnumDebugStackFramesrDs r"rZz&DebugStackFrameSniffer.EnumStackFramess5 =>>>  / /1R   r'N) r2r3r4_public_methods_rIID_IDebugStackFrameSniffer_com_interfaces_rrZr6r'r"rYrYsG)*;<555      r'rYcJeZdZejgZgdZdZdZdZ dZ dZ dZ dS) rU)GetPropertyInfoGetExtendedInfoSetValueAsString EnumMembers GetParentc||_dSr$)r)rrs r"rz StackFrameDebugProperty.__init__s  r'c$tddS)Nz(StackFrameDebugProperty::GetPropertyInforC)r dwFieldSpecnRadixs r"rbz'StackFrameDebugProperty.GetPropertyInfo?@@@@@r'c$tddS)Nz(StackFrameDebugProperty::GetExtendedInforCrDs r"rcz'StackFrameDebugProperty.GetExtendedInforkr'c$tddS)NzDebugProperty::SetValueAsStringrC)rvalueradixs r"rdz(StackFrameDebugProperty.SetValueAsStrings677777r'cxtd|||ddlm}|j|jj||||jS)Nrer)r)printrKrMakeEnumDebugPropertyrr)rrirjr?rs r"rez#StackFrameDebugProperty.EnumMemberssQ m[&#666!!!!!!0{0 J fc4:   r'c$tddS)NzDebugProperty::GetParentrCrDs r"rfz!StackFrameDebugProperty.GetParents/00000r'N) r2r3r4rrVr`r^rrbrcrdrerfr6r'r"rUrUs23AAAAAA888   11111r'rU)r5r*rKrrrutilrrr r rrYrUr6r'r"rus ,,,,,,,,,,,,,,,,,,,, 424242424288424242n6V6V6V6V6Vh.6V6V6Vr        $!1!1!1!1!1!1!1!1!1!1r'