Virtual Catch Block for Debugger Exception Handling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current debugging tools lack a satisfactory method to handle unhandled exceptions and continue execution from a debugger, as they cannot virtually insert an empty catch block to manage exceptions without specified handlers.
Innovation Solution
The mechanism allows a debugger to virtually insert an empty catch block at various points in the call stack, enabling handling of both handled and unhandled exceptions and specifying a restart point for code execution, even if no exception handler is defined in the source code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a debugger notifies a user of an unhandled exception, then the user can choose to terminate or restart execution, but the execution cannot continue from the debugger without a catch block
Solution Approach 1:
The patent introduces a virtual catch block as an intermediary mechanism between the exception throwing code and the debugger. This virtual catch block allows the debugger to intercept and handle exceptions without requiring actual source code modifications, enabling continuous execution while maintaining the exception handling workflow
Solution Approach 2:
The patent creates a virtual copy of a catch block in the debugger's memory space without modifying the actual source code. This virtual catch block replicates the functionality of a real catch block, allowing exceptions to be caught and handled by the debugger, enabling developers to continue execution after handling exceptions
2Reliability
If exception handling constructs are added to source code to handle exceptions, then exceptions can be managed, but the code structure becomes more complex and requires manual intervention
Solution Approach 1:
The debugger acts as an intermediary that provides virtual exception handling capabilities without requiring changes to the source code structure. The virtual catch block mechanism allows exceptions to be handled reliably while keeping the original code structure intact and simple
Solution Approach 2:
The debugger automatically manages exception handling through the virtual catch block mechanism, eliminating the need for developers to manually add exception handling constructs to the code. The system self-services by intercepting and handling exceptions in the debugger environment
3Productivity
If the debugger allows restarting execution at the failed instruction, then debugging can continue, but execution cannot resume at arbitrary points without a catch block
Solution Approach 1:
The virtual catch block serves as an intermediary that enables flexible execution restart at any point within the try block scope. By inserting this virtual construct, the debugger can intercept exceptions and allow resumption of execution at desired locations without being constrained by the original code structure
Solution Approach 2:
The patent introduces dynamic flexibility to execution restart by allowing the virtual catch block to be positioned at various points in the call stack. This enables the debugger to adaptively choose where to resume execution based on debugging needs, rather than being fixed to specific locations
Data Source
AI summary
The techniques and mechanisms described herein are directed to a method for virtually catching an exception. A debugger receives a notification identifying information about an exception that occurred during execution of an application. The debugger then selectively chooses a location on a call stack where execution of the application resumes after the stack is unwound up to the selected location. The location being between a statement on the stack causing the exception and a handler on the stack. The handler being identified during a search phase for exception processing. The mechanism being operative for both handled exceptions and unhandled exceptions.


