Example #1
0
 int IDebugStackFrame2.GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     Debug.WriteLine("AD7StackFrame: GetExpressionContext");
     // Add expression context to evaluate watches.
     ppExprCxt = new AD7DebugExpressionContext(this);
     return(VSConstants.S_OK);
 }
Example #2
0
        private IDebugProperty2 EvaluateExpression(IDebugThread2 thread, string expression)
        {
            // Capture a IDebugExpression2 interface inorder to do that.
            IEnumDebugFrameInfo2 debugFrameEnumerator;

            if (thread.EnumFrameInfo((uint)enum_FRAMEINFO_FLAGS.FIF_FRAME, decimalBaseRadix, out debugFrameEnumerator) != S_OK)
            {
                return(null);
            }

            IDebugExpressionContext2 expressionContext = null;

            using (new DisposableComReference(debugFrameEnumerator)) {
                debugFrameEnumerator.Reset();

                uint frameCount;
                if (debugFrameEnumerator.GetCount(out frameCount) != S_OK)
                {
                    return(null);
                }

                FRAMEINFO[] frameInfo = new FRAMEINFO[frameCount];
                if (debugFrameEnumerator.Next(frameCount, frameInfo, ref frameCount) != S_OK)
                {
                    return(null);
                }

                for (int i = 0; i < frameInfo.Length; i++)
                {
                    if (frameInfo[i].m_pFrame != null && frameInfo[i].m_pFrame.GetExpressionContext(out expressionContext) == S_OK)
                    {
                        break;
                    }
                }
            }

            using (new DisposableComReference(expressionContext)) {
                IDebugExpression2 debugExpression;
                string            errorString;
                uint errorIndex;

                if (expressionContext.ParseText(expression, (uint)enum_PARSEFLAGS.PARSE_EXPRESSION, decimalBaseRadix, out debugExpression, out errorString, out errorIndex) != S_OK)
                {
                    return(null);
                }

                using (new DisposableComReference(debugExpression)) {
                    IDebugProperty2 debugProperty;
                    if (debugExpression.EvaluateSync((uint)enum_EVALFLAGS.EVAL_NOSIDEEFFECTS, evaluateExpressionTimeout, null, out debugProperty) == S_OK)
                    {
                        return(debugProperty);
                    }
                }
            }

            return(null);
        }
        public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
        {
            if (_nativeMethod)
            {
                ppExprCxt = null;
                return(VSConstants.E_FAIL);
            }

            ppExprCxt = new JavaDebugExpressionContext(this);
            return(VSConstants.S_OK);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public int GetExpressionContext(out IDebugExpressionContext2 expressionContext)
        {
            //
            // Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
            //

            LoggingUtils.PrintFunction();

            expressionContext = this;

            return(Constants.S_OK);
        }
Example #5
0
 private static void __Execute(IDebugExpressionContext2 context, string expression)
 {
     if ((context != null) && (string.IsNullOrEmpty(expression) == false))
     {
         var a_Context = (IDebugExpression2)null;
         {
             var a_Context1 = "";
             var a_Context2 = (uint)0;
             if (context.ParseText(expression, enum_PARSEFLAGS.PARSE_EXPRESSION, 0, out a_Context, out a_Context1, out a_Context2) == VSConstants.S_OK)
             {
                 var a_Context3 = (IDebugProperty2)null;
                 a_Context.EvaluateSync(enum_EVALFLAGS.EVAL_RETURNVALUE, 2000, null, out a_Context3);
             }
             else
             {
                 service.Output.WriteError(a_Context1 + "// Error code: " + a_Context2.ToString());
             }
         }
     }
 }
Example #6
0
 // Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
 // Generally, an expression evaluation context can be thought of as a scope for performing expression evaluation.
 // Call the IDebugExpressionContext2::ParseText method to parse an expression and then call the resulting IDebugExpression2::EvaluateSync
 // or IDebugExpression2::EvaluateAsync methods to evaluate the parsed expression.
 int IDebugStackFrame2.GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = this;
     return(VSConstants.S_OK);
 }
 /// <summary>
 /// Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
 /// </summary>
 /// <param name="ppExprCxt">Returns an IDebugExpressionContext2 object that represents a context for expression evaluation.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
 /// <remarks>Generally, an expression evaluation context can be thought of as a scope for performing expression evaluation. Call the IDebugExpressionContext2::ParseText method to parse an expression and then call the resulting IDebugExpression2::EvaluateSync or IDebugExpression2::EvaluateAsync methods to evaluate the parsed expression.</remarks>
 public virtual int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     Logger.Debug(string.Empty);
     ppExprCxt = null;
     return(VSConstants.E_NOTIMPL);
 }
Example #8
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = this;
     return VSConstants.S_OK;
 }
Example #9
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugStackFrame.GetExpressionContext");
     ppExprCxt = this;
     return(VSConstants.S_OK);
 }
Example #10
0
 // Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
 // Generally, an expression evaluation context can be thought of as a scope for performing expression evaluation.
 // Call the IDebugExpressionContext2::ParseText method to parse an expression and then call the resulting IDebugExpression2::EvaluateSync
 // or IDebugExpression2::EvaluateAsync methods to evaluate the parsed expression.
 int IDebugStackFrame2.GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = (IDebugExpressionContext2)this;
     return(VisualStudioExtensionConstants.S_OK);
 }
Example #11
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = null;
     return(VSConstants.E_NOTIMPL);
 }
Example #12
0
 int IDebugStackFrame2.GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = null;
     return(VSConstants.E_NOTIMPL);
 }
Example #13
0
 public int GetExpressionContext(out IDebugExpressionContext2 expressionContext)
 {
     expressionContext = Self;
     return(VSConstants.S_OK);
 }
 // Token: 0x060000EA RID: 234 RVA: 0x00004B7D File Offset: 0x00002D7D
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = new StackFrame.ExpressionContext(this);
     return(0);
 }
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     Log.Debug("ScriptStackFrame: GetExpressionContext");
     ppExprCxt = this;
     return(VSConstants.S_OK);
 }
Example #16
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = this;
     return(Constants.S_OK);
 }
 /// <summary>
 /// Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
 /// </summary>
 /// <param name="ppExprCxt">Returns an IDebugExpressionContext2 object that represents a context for expression evaluation.</param>
 /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns>
 /// <remarks>Generally, an expression evaluation context can be thought of as a scope for performing expression evaluation. Call the IDebugExpressionContext2::ParseText method to parse an expression and then call the resulting IDebugExpression2::EvaluateSync or IDebugExpression2::EvaluateAsync methods to evaluate the parsed expression.</remarks>
 public virtual int GetExpressionContext( out IDebugExpressionContext2 ppExprCxt )
 {
     Logger.Debug( string.Empty );
     ppExprCxt = null;
     return VSConstants.E_NOTIMPL;
 }
Example #18
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugStackFrame.GetExpressionContext");
     ppExprCxt = this;
     return VSConstants.S_OK;
 }
Example #19
0
        public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
        {
            if (_nativeMethod)
            {
                ppExprCxt = null;
                return VSConstants.E_FAIL;
            }

            ppExprCxt = new JavaDebugExpressionContext(this);
            return VSConstants.S_OK;
        }
Example #20
0
 // Gets an evaluation context for expression evaluation within the current context of a stack frame and thread.
 // Generally, an expression evaluation context can be thought of as a scope for performing expression evaluation.
 // Call the IDebugExpressionContext2::ParseText method to parse an expression and then call the resulting IDebugExpression2::EvaluateSync
 // or IDebugExpression2::EvaluateAsync methods to evaluate the parsed expression.
 int IDebugStackFrame2.GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = (IDebugExpressionContext2)this;
     return Constants.S_OK;
 }
Example #21
0
 public int GetExpressionContext(out IDebugExpressionContext2 ppExprCxt)
 {
     ppExprCxt = null;
     return VSConstants.E_NOTIMPL;
 }