Embedded Firmware Debug Trace via Branch Instruction Recording

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing debug systems cannot perform debug traces on embedded systems like BIOS or Android without modifying the program code, limiting their ability to trace and analyze the execution paths of these systems effectively.

Innovation Solution

A method and system that utilize a debug tool program and engine to configure temporary storage in an embedded system's memory, record load addresses and branch instruction execution records, and generate analysis reports using a program debug symbol table, allowing real-time control of branch trace functions and efficient data analysis without altering the program code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If debug trace is performed on embedded systems without modifying program code, then the ability to trace execution paths is improved, but the storage space requirement increases

Engineering Contradiction:
Improvedebug trace capabilityVSAvoidstorage space
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the trace data storage into two parts: a compact branch instruction execution record set stored in the embedded system's memory, and a detailed analysis report generated externally. This segmentation allows the system to maintain minimal storage footprint while still providing comprehensive debug trace capability through external analysis tools that process the recorded data.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a copy of the execution trace data in a format suitable for external analysis. The branch instruction execution record set captures essential execution path information, and this copied data is then transferred to external systems for detailed analysis, eliminating the need for large-scale storage of complete execution traces in the embedded system itself.

Inventive Principle:
Principle #26Copying

2Ease of operation

If branch trace function is controlled in real time from remote end, then the ease of operation is improved, but the device complexity increases

Engineering Contradiction:
Improvereal-time controlVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary communication interface between the embedded system and external control systems. This interface enables remote control of the branch trace function without requiring direct modification of the embedded system's core execution logic, thus achieving real-time control while managing system complexity through a standardized communication layer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent designs the debug engine to serve multiple functions: it can enable/disable branch trace, control trace depth, manage storage allocation, and interface with external systems. This multi-functionality consolidates control logic into a single component, reducing overall system complexity while providing comprehensive real-time control capabilities.

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

3Quantity of substance

If limited storage space is used for tracing, then the storage space requirement is reduced, but the measurement precision of execution paths decreases

Engineering Contradiction:
Improvestorage spaceVSAvoidexecution path recording
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent extracts only the essential information needed for execution path tracing from the complete program execution data. The branch instruction execution record set captures load addresses, branch instruction addresses, and execution sequences, while omitting redundant details. This extraction maintains measurement precision for execution path analysis while significantly reducing storage requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the representation parameters of execution trace data from detailed instruction-level information to a condensed format containing only essential branch and load address relationships. This parameter transformation maintains the precision needed for execution path analysis while reducing the storage footprint to fit within limited memory constraints.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9645911B2System and method for debugging firmware/software by generating trace data
Publication Date: 2017.05.09 INSYDE SOFTWARE CORP
  • US9645911B2 patent drawing
  • US9645911B2 patent drawing
  • US9645911B2 patent drawing

AI summary

A method for debugging firmware/software by generating trace data includes the following steps: running a debug module in a power-on stage in a test system, to record a load address and a branch instruction execution record set of a tested module into an area for temporary storage; accessing, by an analyzer, in an operating system stage in the area for temporary storage, the load address and the branch instruction execution record set and accessing a program debug symbol table, where the program debug symbol table is generated when source program code is compiled; and finding, by the analyzer, an original source file, a function name, and line numbers of executed codes from the program debug symbol table according to the load address and the branch instruction execution record set to generate an analysis report that includes a program execution path and a program code coverage.