Debugger: Implement expression variable value resolution.

General:
- Resolving variable values requires both a stack frame and a CPU state.
  Adjust all interfaces and callers accordingly.

ExpressionEvaluationJob:
- Pass additional parameters needed for variable value resolution.
- If variable resolution is desired, ExpressionEvaluationJob now
  creates a temporary ValueNodeManager for that purpose.
- If the expression parser returns a value node pointer that needs
  to be resolved, schedule a corresponding job and wait.

CLanguageExpressionEvaluator:
- Clean up some leftovers that were preventing variable names from being
  handled properly in some cases.
- Implement handling of identifier names. These are now looked up against
  the value node graph of the active node manager, and if found, corresponding
  values are retrieved. If the value has not yet been resolved, an exception
  is thrown to ask that to be done.

This gets value resolution working for basic local variables and function
parameters, and consequently, #9712. Structure/class members and/or pointer
indirection aren't yet handled.
This commit is contained in:
Rene Gollent
2014-10-29 17:41:54 -04:00
parent de6278fec1
commit c3f81329bb
14 changed files with 256 additions and 60 deletions
@@ -30,7 +30,8 @@ SourceLanguage::ParseTypeExpression(const BString& expression,
status_t
SourceLanguage::EvaluateExpression(const BString& expression,
type_code type, Value*& _resultValue)
type_code type, ValueNodeManager* manager, Value*& _resultValue,
ValueNode*& _neededNode)
{
return B_NOT_SUPPORTED;
}