Execution-Centric Source Code Reconstruction for Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging software programs is challenging due to the difficulty in determining the correct execution sequence of code, as existing tools only provide insights into the current program state and execution call trees, which are insufficient for identifying the root cause of complex problems.
Innovation Solution
Reconstructing source code in an execution-centric format using trace data to display the actual order of code execution, including symbols for execution flow and overlaying events that occurred at specific points in time, allowing users to visualize the execution path and connections.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If traditional debugger tools are used to step through code and view current program state, then developers can observe variable states and stack information, but they cannot accurately determine the actual execution sequence and path taken by the program
Solution Approach 1:
The system performs preliminary actions by collecting trace data during program execution and reconstructing the execution sequence before the debugging session begins. This allows the execution path to be pre-computed and displayed, eliminating the need for developers to manually trace through code during debugging.
Solution Approach 2:
The system creates a copy of the execution sequence information from the original program run and presents it in a reconstructed format that shows the actual path taken. This copy preserves the historical execution data without requiring the original program to be re-executed or modified.
2Measurement precision
If execution call trees are displayed to show the sequence of functions executed, then developers can see function-level execution order, but they lack insight into the detailed actions and statements within functions that cause problems
Solution Approach 1:
The system segments the execution information into hierarchical levels: function-level calls and statement-level actions within each function. This segmentation allows developers to view details at the appropriate granularity without being overwhelmed by all execution data simultaneously.
Solution Approach 2:
The system adds a new dimension to execution visualization by displaying not just the sequence of function calls but also the specific statements executed within each function. This multi-dimensional view combines call tree structure with detailed statement-level trace information.
3Reliability
If the program stack is examined to look back at previous program states, then developers can see clues about prior states, but the stack is only valid for the current stopped state and does not provide complete execution history
Solution Approach 1:
The system provides feedback by continuously collecting and storing execution trace data throughout program runtime, creating a complete historical record that can be queried and displayed during debugging sessions. This feedback loop ensures accurate reconstruction of any previous state.
Solution Approach 2:
The execution history is pre-computed and stored during normal program execution, so when debugging is needed, the complete execution path is already available for immediate display without requiring time-consuming re-analysis or re-execution.
Data Source
AI summary
Various technologies and techniques are disclosed for providing an execution-centric view of source code. Source code is reconstructed in an execution-centric format from a prior execution of an application. Trace data is used to determine which code addresses were executed during a prior execution of an application. Addresses in the trace data are mapped back to source code to reconstruct the source code in the execution order. The source code is then displayed in the execution-centric format. Other events that occurred at different points in time can be overlaid in the display of the execution-centric source code.


