-
Notifications
You must be signed in to change notification settings - Fork 51
Native Expression Evaluators
Patrick Nelson edited this page Sep 10, 2015
·
2 revisions
To demonstrate how expression evaluators work, this section walks through what happens when the user enters text in the watch window using an expression evaluator for a language which compiles to native code.
Sequence of a watch expression for the expression evaluator of a native language:
- User types a new expression in the watch window and hits enter
- A new DkmLanguageExpression object is created
- The debugger selects an expression evaluator to use. This is generally based on the language of the stack frame being examined.
- The expression evaluator is asked to evaluate the expression using
IDkmLanguageExpressionEvalutor.EvaluateExpression
- Note: This is called through a work list, so the expression evaluator must call the completion routine when it is complete
- The expression evaluator should generate a collection of Native Intermediate Instructions that describe how to calculate the result value. This is a stack based machine that can read memory values, read registers, and do arithmetic with a single round trip across the network
- The DkmIL is passed to the Native Debug Monitor by the expression evaluator to obtain the raw result
- If the DkmIL executes without issue, values from the stack are returned to the expression evaluator.
- The expression evaluator formats the result expression as a string and returns it as an instance of
DkmEvaluationResult
to the completion routine from the worklist - The formatted expression result is extracted displayed to the user.
Concord Documentation:
- Overview
- Visual Studio 2022 support
- Concord Architecture
- Getting troubleshooting logs
- Tips for debugging extensions
- Component Discovery and Configuration
- Component Levels
- Navigating the Concord API
- Obtaining the Concord API headers, libraries, etc
- Concord Threading Model
- Data Container API
- Creating and Closing Objects
- Expression Evaluators (EEs)
- .NET language EEs
- Native language EEs
- Installing Extensions
- Cross Platform and VS Code scenarios:
- Implementing components in native code:
- Worker Process Remoting
Samples: