Virtual Catch Block for Debugger Exception Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveexception handling capabilityVSAvoiddebugger functionality
Core Design Contradiction:
Ease of operationVSDevice complexity

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

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Inventive Principle:
Principle #26Copying

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

Engineering Contradiction:
Improveexception handlingVSAvoidcode structure
Core Design Contradiction:
ReliabilityVSDevice complexity

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

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Inventive Principle:
Principle #25Self-service

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

Engineering Contradiction:
Improvedebugging efficiencyVSAvoidexecution restart flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

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

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7596780B2System and method for virtual catching of an exception
Publication Date: 2009.09.29 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7596780B2 patent drawing
  • US7596780B2 patent drawing
  • US7596780B2 patent drawing

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.