Post-execution Debugger Trace Analysis for Software Bug Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional debuggers are inefficient in finding reproducible bugs that take a long time to reproduce and irreproducible bugs, which often manifest far after the causative instruction and can only be detected when the program runs at full speed, making it difficult for programmers to diagnose and fix complex software issues.

Innovation Solution

A post-execution debugging system that records trace data of machine instructions, maps source code to machine code, and calculates performance data by determining execution times, allowing for the display of performance metrics and annotation of source code, enabling enhanced binary search and simulation of program execution to locate bugs efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional debuggers are used to find bugs, then debugging capability is provided, but time required to find bugs is excessively long

Engineering Contradiction:
Improvedebugging capabilityVSAvoidtime required to find bugs
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary action by recording execution traces of machine instructions before debugging analysis. The trace recording module captures the sequence of executed instructions, allowing the debugger to analyze pre-recorded data without slowing down program execution, thus resolving the time consumption issue while maintaining debugging capability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the execution trace data separately from the original program. The trace recording module generates a duplicate record of instruction execution sequences, which can be analyzed independently without affecting the original program's performance or requiring the program to run at debugging speed

Inventive Principle:
Principle #26Copying

2Reliability

If program runs at full speed to detect irreproducible bugs, then detection capability is improved, but ability to use traditional debugger is lost

Engineering Contradiction:
Improvebug detection capabilityVSAvoiddebugger usability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system records execution traces at full program speed before debugging analysis. The trace recording module captures complete execution sequences during normal high-speed operation, preserving irreproducible bugs in the recorded data while allowing the debugger to operate independently at any speed

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The execution trace acts as an intermediary between full-speed program execution and debugger analysis. The trace recording module creates a mediating record that contains bug information from full-speed execution, which the debugger can then analyze without needing to run the program at full speed

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If debugger slows down program execution for analysis, then debugging detail is improved, but irreproducible bugs disappear

Engineering Contradiction:
Improvedebugging detailVSAvoidirreproducible bug presence
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The system performs preliminary trace recording during normal program execution at full speed, capturing irreproducible bugs before they can disappear. The trace recording module preserves the complete execution sequence including rare bug manifestations, which can then be analyzed in detail without re-executing the program

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the execution trace that preserves all program states and instruction sequences. This copied trace data allows detailed debugger analysis of program behavior without requiring the original program to be executed again, ensuring irreproducible bugs remain visible in the recorded data

Inventive Principle:
Principle #26Copying

4Reliability

If traditional debugger is used for reproducible bugs taking long to reproduce, then debugging is possible, but time efficiency is poor

Engineering Contradiction:
Improvedebugging functionalityVSAvoidtime efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary recording of complete execution traces before debugging analysis. The trace recording module captures all instruction executions including rare bug reproductions, allowing the debugger to immediately analyze pre-recorded data without waiting for bugs to reproduce during debugging sessions

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains continuous trace recording throughout program execution without interruption. The trace recording module continuously captures execution sequences, ensuring that even rare reproducible bugs are recorded in the trace data, eliminating the need for repeated program executions to catch bug manifestations

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS7653899B1Post-execution software debugger with performance display
Publication Date: 2010.01.26 GREEN HILLS SOFTWARE LLC
  • US7653899B1 patent drawing
  • US7653899B1 patent drawing
  • US7653899B1 patent drawing

AI summary

A method for finding an error in a computer program is disclosed. A sequence of machine instructions performed by a processor is recorded as trace data. A mapping file is accessed. A source code instruction is translated into a machine code instruction according to a mapping found in the mapping file. Further, at least a portion of the trace data is searched through until the machine code instruction is found. In addition, a first execution time of the machine code instruction is determined by reviewing the trace data in a first vicinity that an address of the machine code instruction is located. Further, a second execution time of the next machine code instruction is determined by reviewing the trace data in a second vicinity that an address of the next machine code instruction is located. Accordingly, performance data is calculated by subtracting the first execution time from the second execution time. The performance data is displayed.