Debugger: Add asynchronous expression evaluation interface.

- Add UserInterfaceListener hook to request expression evaluation.
- Add corresponding events/handlers in Team and TeamDebugger.

These allow callers to request evaluation of expressions by the
debugger core's worker threads with asynchronous notifications of
results. While not strictly necessary right now, this paves the way
for further changes to come, as handling of variables will
potentially require resolving their values if they haven't been
already, and this shouldn't be done from user interface threads.
This commit is contained in:
Rene Gollent
2014-10-28 23:30:01 -04:00
parent feab8604c9
commit 2d5794a1a3
8 changed files with 166 additions and 4 deletions
@@ -102,6 +102,12 @@ private:
virtual void InspectRequested(target_addr_t address,
TeamMemoryBlock::Listener* listener);
virtual void ExpressionEvaluationRequested(
SourceLanguage* language,
const char* expression,
type_code resultType,
StackFrame* frame = NULL);
virtual void DebugReportRequested(entry_ref* targetPath);
virtual void TeamRestartRequested();
@@ -182,6 +188,13 @@ private:
void _HandleInspectAddress(
target_addr_t address,
TeamMemoryBlock::Listener* listener);
void _HandleEvaluateExpression(
SourceLanguage* language,
const char* expression,
type_code resultType,
StackFrame* frame);
status_t _HandleSetArguments(int argc,
const char* const* argv);