Exception Handling System Source Code Reconstruction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
It is difficult and time-consuming to trace exceptions in binary code back to the original source code, even with additional files like those in the .NET framework or Java, as useful information is lost during compilation.
Innovation Solution
A method that receives exception information from binary code, accesses intermediate code using a code reference and location, converts it to a source code approximation, and provides this approximation along with the function name for analysis, utilizing tools like .NET Reflector or IL disassembler to aid in identifying the source of the exception.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If binary code is compiled from source code, then executable code is generated, but useful information (function names, variable names, line information) is lost
Solution Approach 1:
The patent applies preliminary action by capturing and storing source code information (function names, variable names, line numbers, parameter types) in intermediate code files (such as .mdb files in .NET) before the compilation to binary code occurs. This pre-stored information is then retrieved during exception handling to reconstruct source code context, thereby resolving the information loss problem without affecting the compilation process.
2Loss of time
If intermediate code files are accessed to retrieve source code information, then exception tracing is improved, but the debugging process becomes more complex
Solution Approach 1:
The patent introduces an intermediary component (exception handling system with source code reconstruction capability) that mediates between the binary code execution and the intermediate code files. This intermediary automatically retrieves and reconstructs source code information from intermediate files when exceptions occur, reducing the complexity burden on developers while improving exception analysis speed.
3Measurement precision
If source code information is reconstructed from intermediate code, then exception location is identified more accurately, but additional processing steps are required
Solution Approach 1:
The patent implements self-service by enabling the exception handling system to automatically retrieve and reconstruct source code information from intermediate code files without requiring manual developer intervention. The system autonomously performs the reconstruction process using stored information (function names, line numbers, variable types), thereby achieving high precision exception location while minimizing the perceived complexity for end users.
Data Source
AI summary
A method of using exception information for binary code. The method comprises: receiving exception information relating to an exception occurring during execution of binary code, the exception information including a code reference identifying a function executing while the exception occurred, and a line number for that function. The method also comprises: accessing intermediate code using the code reference and the line number to obtain intermediate code fragments; converting the intermediate code fragments to a source code approximation; and providing the source code approximation and function name to a log for subsequent analysis.


