Debug Expression Evaluation via Embedded AST Nodes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging applications often require evaluating expressions within a paused program execution, which can be inefficient due to the need for custom expression evaluators and keeping debuggers updated with various compiler implementations.

Innovation Solution

The system embeds abstract syntax trees in debugging information generated by the compiler, allowing the debugger to evaluate expressions without requiring a separate expression evaluator, reducing the need for frequent updates and improving debugging efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If a debugger uses a separate custom expression evaluator to evaluate expressions during debugging, then expression evaluation capability is achieved, but device complexity and maintenance burden increase

Engineering Contradiction:
Improveexpression evaluation capabilityVSAvoiddebugger structure
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent merges the expression evaluation functionality directly into the debugger by embedding an expression evaluator component within the debugger architecture. This integration eliminates the need for separate external evaluators while maintaining full expression evaluation capability during debugging sessions.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The embedded expression evaluator is designed to handle multiple types of expressions and data structures universally. It can evaluate expressions against various debugging data types (variables, memory contents, register values) without requiring separate specialized evaluators for each type, thereby reducing overall system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If the debugger is frequently updated to keep pace with compiler implementations, then compatibility with latest compiler features is maintained, but loss of time and productivity decrease

Engineering Contradiction:
Improvecompiler compatibilityVSAvoiddebugging efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The expression evaluator is pre-configured with knowledge of debugging data types and evaluation rules that are established by compiler standards. This preliminary setup allows the debugger to handle current and future compiler implementations without requiring frequent updates, as the evaluator is designed to be forward-compatible with compiler evolution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system allows for parameter adjustments in the expression evaluator to adapt to different compiler versions and implementations. Rather than requiring structural changes or complete rewrites, simple parameter modifications enable the debugger to maintain compatibility across compiler updates, thereby preserving productivity.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If the debugger includes comprehensive expression evaluation functionality, then debugging capability is improved, but debugging data size and processing overhead increase

Engineering Contradiction:
Improvedebugging capabilityVSAvoiddebugging data size
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The expression evaluation logic is extracted as a separate, modular component within the debugger architecture. This extracted evaluator can be selectively activated only when expression evaluation is needed, rather than being permanently embedded in all debugging operations. This reduces the overall data processing overhead while maintaining full capability when required.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10037260B2System for expression evaluation at debug time
Publication Date: 2018.07.31 RED HAT INC
  • US10037260B2 patent drawing
  • US10037260B2 patent drawing
  • US10037260B2 patent drawing

AI summary

A system for expression evaluation at debug time includes a debugger which receives an executable program with debugging information from a compiler, where the executable program with the debugging information is generated by compiling a source code program and generating debugging information corresponding to the executable program. The compiler embeds at least a first abstract syntax tree of a first expression of the source code program in the debugging information. The debugger receives a first debugging command from a debugger client to evaluate a selected portion of the first expression. The debugger determines one or more nodes of the abstract syntax tree that correspond to the selected portion of the first expression. The debugger then steps through and evaluates the one or more nodes of the abstract syntax tree and returns one or more values generated by the evaluation.