Pass-By Breakpoint Debugging via Instruction Duplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing pass-by breakpoint setting and debugging methods require significant memory space and involve manual parsing, leading to low program debugging efficiency.

Innovation Solution

A method that sets a pass-by breakpoint by determining if the instruction at the breakpoint and the previous instruction are relative jump instructions, creating an instruction duplicate with the relative jump instruction and the next instruction, translating the relative jump to an absolute jump, and setting the breakpoint as an abnormal instruction to minimize memory usage and avoid manual parsing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all source program code is backuped in memory space and instructions are modified to cause jumps to backup code for pass-by breakpoint, then pass-by breakpoint functionality is achieved, but memory space occupation increases significantly

Engineering Contradiction:
Improvepass-by breakpoint functionalityVSAvoidmemory space occupation
Core Design Contradiction:
ReliabilityVSVolume of stationary object

Solution Approach 1:

The patent divides the pass-by breakpoint implementation into segments: only the specific instruction at the breakpoint and the next instruction are modified, rather than backupping the entire source program code. This segmentation reduces memory occupation while maintaining the pass-by breakpoint functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts only the necessary instructions (the breakpoint instruction and the next instruction) from the source program code for modification, rather than extracting and backupping the entire codebase. This extraction approach minimizes memory space requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If advanced language is used to manually parse the instruction at the breakpoint and PC++ is used to jump to the next instruction, then pass-by breakpoint debugging is achieved, but program debugging efficiency decreases

Engineering Contradiction:
Improvepass-by breakpoint debugging functionalityVSAvoidprogram debugging efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements automatic processing of pass-by breakpoint debugging through the instruction duplicate mechanism and automatic jump logic, eliminating the need for manual parsing by developers. The system serves itself by automatically handling the breakpoint recovery process.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent prepares the instruction duplicate and jump instructions in advance during program compilation or loading, so that when a breakpoint is triggered, the system can immediately execute the pre-prepared instructions without requiring manual parsing or intervention during debugging.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If instruction duplicate is created with absolute jump instruction to handle relative jump instructions, then correct program flow is maintained, but device complexity increases

Engineering Contradiction:
Improveprogram flow correctnessVSAvoidinstruction duplicate mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent changes the parameter of the jump instruction from relative addressing to absolute addressing in the instruction duplicate. This parameter change ensures that the jump target is correctly identified regardless of the instruction's position, maintaining program flow correctness while using a straightforward transformation.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP2506145B1Method and device for pass-by breakpoint setting and debugging
Publication Date: 2015.04.22 HUAWEI TECH CO LTD
  • EP2506145B1 patent drawingFigure 1~2
  • EP2506145B1 patent drawingFigure 3~3A
  • EP2506145B1 patent drawingFigure 4~7

AI summary

A method and device for pass-by breakpoint setting and debugging are disclosed. The pass-by breakpoint setting method comprises: receiving a breakpoint setting command; determining an instruction at a breakpoint in a source program code according to the breakpoint setting command; if one of the instruction at the breakpoint and an instruction prior to the instruction at the breakpoint is a relative jump instruction, setting an instruction duplicate, and setting the instruction at the breakpoint in the source program code as a first abnormal instruction, wherein setting an instruction duplicate comprises: storing the relative jump instruction and the instruction next to the relative jump instruction in the instruction duplicate, a jump relative offset of the relative jump instruction in the instruction duplicate being set according to a storage position of an absolute jump instruction in the instruction duplicate, a jump absolute offset of the absolute jump instruction being an original jump relative offset of the relative jump instruction, setting a second valid instruction next to the relative jump instruction in the instruction duplicate as a second abnormal instruction, and setting an instruction next to the absolute jump instruction as an invalid instruction.