Conditional Breakpoint Handling via Compiler-Assisted Code Injection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The standard approach for handling conditional breakpoints in debugger programs is inefficient, leading to low processing speed and significant delays, especially when breakpoints are within loops or code executed multiple times, affecting real-time applications.

Innovation Solution

A debugger program that collaborates with a compiler program to generate a breakpoint handling routine, injecting a jump instruction and translating conditions into intermediate language, allowing conditional breakpoints to be evaluated at runtime without interrupting the target program's execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the standard approach is used to handle conditional breakpoints by pausing execution and evaluating conditions, then the breakpoint can be properly evaluated, but the processing speed becomes very low and large delays are introduced

Engineering Contradiction:
Improvebreakpoint condition evaluation accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-compiling breakpoint conditions into efficient evaluation routines during the debugging session setup. The debugger program pre-processes condition expressions and compiles them into optimized forms that can be evaluated quickly at runtime without requiring full program suspension, thus preparing the evaluation mechanism in advance to avoid speed penalties during actual breakpoint triggering.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent substitutes the mechanical suspension-pause-resume execution model with a software-based condition evaluation system. Instead of physically interrupting program execution to evaluate conditions, the system uses compiled evaluation routines that can assess breakpoint conditions through software mechanisms, replacing the mechanical stop-start execution cycle with continuous software-driven condition checking.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If conditional breakpoints are placed inside loops or frequently executed code, then comprehensive debugging coverage is achieved, but execution delays are significantly amplified

Engineering Contradiction:
Improvedebugging coverageVSAvoidexecution delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent enables continuity of useful action by allowing the target program to continue executing without interruption even when conditional breakpoints are encountered. The condition evaluation occurs through software routines that do not suspend program flow, maintaining continuous execution and preventing time loss that would otherwise accumulate with repeated breakpoint hits in loops or frequently executed code paths.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The patent introduces an intermediary condition evaluation routine that acts as a mediator between the executing program and the breakpoint checking mechanism. This intermediary layer evaluates breakpoint conditions through pre-compiled efficient routines rather than direct program suspension, reducing the time penalty and allowing comprehensive debugging coverage without proportionally increasing execution delays.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If the debugger program suspends execution to evaluate conditions, then accurate state inspection is possible, but real-time application behavior is altered

Engineering Contradiction:
Improvestate inspection accuracyVSAvoidreal-time application behavior
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent replaces the mechanical suspension mechanism with software-based state inspection. Instead of suspending execution to inspect state, the system uses compiled evaluation routines that can read program state variables and evaluate conditions without interrupting the real-time execution flow, thus maintaining both inspection accuracy and behavioral reliability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent maintains continuity of useful action by enabling state inspection and condition evaluation to occur without suspending program execution. The debugger program continuously monitors and evaluates conditions through efficient software routines, allowing real-time applications to maintain their natural behavior while still enabling accurate state inspection when needed.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS9785536B2Code injection for conditional breakpoints
Publication Date: 2017.10.10 NXP USA INC
  • US9785536B2 patent drawing
  • US9785536B2 patent drawing
  • US9785536B2 patent drawing

AI summary

An apparatus for debugging operational code of a target program comprises a memory storing the operational code and a set of instructions representing a debugger program for debugging the operational code. A microprocessor is configured to execute the operational code and the debugger program. The debugger program can inject a jump to a breakpoint handling routine into the operational code and let a compiler program create code pieces for the breakpoint handling routine.