// Parses a text-based expression for evaluation. // The engine sample only supports locals and parameters so the only task here is to check the names in those collections. int IDebugExpressionContext2.ParseText(string pszCode, enum_PARSEFLAGS dwFlags, uint nRadix, out IDebugExpression2 ppExpr, out string pbstrError, out uint pichError) { pbstrError = null; pichError = 0; ppExpr = null; try { // we have no "parser" as such, so we accept anything that isn't blank and let the Evaluate method figure out the errors ppExpr = new AD7Expression(Engine, Engine.DebuggedProcess.Natvis.GetVariable(pszCode, this)); return(Constants.S_OK); } catch (MIException e) { return(e.HResult); } catch (Exception e) { return(EngineUtils.UnexpectedException(e)); } }
// Parses a text-based expression for evaluation. // The engine sample only supports locals and parameters so the only task here is to check the names in those collections. int IDebugExpressionContext2.ParseText(string pszCode, enum_PARSEFLAGS dwFlags, uint nRadix, out IDebugExpression2 ppExpr, out string pbstrError, out uint pichError) { pbstrError = null; pichError = 0; ppExpr = null; try { // we have no "parser" as such, so we accept anything that isn't blank and let the Evaluate method figure out the errors ppExpr = new AD7Expression(Engine.DebuggedProcess.Natvis.GetVariable(pszCode, this)); return Constants.S_OK; } catch (MIException e) { return e.HResult; } catch (Exception e) { return EngineUtils.UnexpectedException(e); } }
public int GetExpression(out IDebugExpression2 expr) { expr = new AD7Expression(_engine, _var); return(Constants.S_OK); }
public int GetExpression(out IDebugExpression2 expr) { expr = new AD7Expression(_engine, _var); return Constants.S_OK; }