Interpreter Breakpoint Lookup via Separate Address Table

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging of interpreter-based software on devices with flash memory is inefficient due to the need to erase and rewrite the entire program to set or clear software breakpoints, which is time-consuming and disruptive to the target code.

Innovation Solution

Implementing a method where a list of breakpoint addresses is maintained separately from the program code, with a look-up function in the interpreter's main loop to check for breakpoints, using binary or linear search, and employing test variables to reduce unnecessary searches by defining ranges of breakpoint-free addresses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If software breakpoints are implemented by inserting breakpoint instructions in flash memory, then breakpoints can be set at desired locations, but the entire program must be erased and rewritten to set or clear breakpoints

Engineering Contradiction:
Improvebreakpoint setting and clearingVSAvoidtime to erase and rewrite program
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent separates breakpoint information from the target program code by maintaining breakpoints in a distinct data structure (breakpoint table) that can be independently modified. This segmentation allows breakpoints to be set and cleared without affecting the program code stored in flash memory, eliminating the need to erase and rewrite the entire program.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts breakpoint functionality from the program code itself and places it in a separate breakpoint table stored in data memory. The interpreter checks this separate table during execution rather than looking for breakpoint instructions embedded in the code, allowing breakpoints to be modified without touching the program code in flash memory.

Inventive Principle:
Principle #2Taking out (Extraction)

2Productivity

If breakpoints are stored in the same memory as program code, then breakpoint information is readily available during execution, but modifying breakpoints requires erasing and rewriting the program

Engineering Contradiction:
Improvedebugging efficiencyVSAvoidbreakpoint modification process
Core Design Contradiction:
ProductivityVSEase of manufacture

Solution Approach 1:

The patent divides the storage system into code memory (flash) for the target program and data memory (RAM) for the breakpoint table. This segmentation allows the breakpoint table to be freely modified in volatile memory without affecting the program code, enabling efficient debugging operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a breakpoint table as an intermediary data structure between the debugger and the target program. This table acts as a mediator that stores breakpoint addresses and can be efficiently updated without modifying the program code, facilitating rapid breakpoint setting and clearing.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If a look-up function checks all breakpoint addresses on every instruction, then accurate breakpoint detection is achieved, but the number of instruction cycles increases

Engineering Contradiction:
Improvebreakpoint detection accuracyVSAvoidinstruction cycles per line of code
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary organization of breakpoint addresses in a sorted breakpoint table before execution. This pre-arranged structure enables efficient binary search during runtime, reducing the number of comparisons needed to detect breakpoints compared to checking all breakpoints linearly.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements an optimized search approach that checks only relevant portions of the breakpoint table based on the current instruction pointer location. By using binary search and maintaining sorted order, the system performs partial checks rather than examining every breakpoint address, reducing overhead while maintaining accuracy.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7895569B2System and method for implementing software breakpoints in an interpreter
Publication Date: 2011.02.22 MALIKIE INNOVATIONS LTD
  • US7895569B2 patent drawing
  • US7895569B2 patent drawing
  • US7895569B2 patent drawing

AI summary

A method for implementing software breakpoints in a software program to be executed by a interpreter, comprising the steps of executing a look-up, in a main loop of the interpreter, the look-up function searching a list of breakpoint addresses to determine whether a breakpoint instruction is to be executed at the address referenced by the interpreter's current instruction pointer instead of the program instruction, and maintaining, in memory, the list of breakpoints addresses separately from the program code, such that the breakpoint list can be altered separately from the program code.