Dynamic Binary Rerouting for Optimized-Code Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging optimized code can be inefficient due to missing context information, erratic debugger stepping behavior, and the need for frequent recompilation, especially in environments like game development where non-optimized builds are too slow.

Innovation Solution

A system and method for dynamic redirection between optimized and non-optimized binaries, using breakpoints and dependency graphs to seamlessly switch between them during debugging, allowing simultaneous execution and navigation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If non-optimized builds are used for debugging, then context information and debugger functionality are improved, but execution speed deteriorates

Engineering Contradiction:
Improvecontext informationVSAvoidexecution speed
Core Design Contradiction:
Loss of informationVSSpeed

Solution Approach 1:

The system segments the debugging process into two distinct execution paths: one using optimized binary for speed-critical sections and another using non-optimized binary for debugging-critical sections. The debugger can selectively switch between these segments based on whether context information or execution speed is the priority for the current debugging task.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system dynamically switches between optimized and non-optimized binary versions during the debugging process. Rather than being static, the debugger can adaptively select which binary version to use based on real-time debugging needs, allowing transition between fast execution mode and detailed inspection mode as required.

Inventive Principle:
Principle #15Dynamics

2Speed

If optimized builds are used for debugging, then execution speed is improved, but debugger functionality deteriorates

Engineering Contradiction:
Improveexecution speedVSAvoiddebugger functionality
Core Design Contradiction:
SpeedVSEase of operation

Solution Approach 1:

The system introduces an intermediary layer (the switching mechanism) between the debugger and the binary code. This intermediary transparently routes debugger operations to the appropriate binary version, allowing the developer to use a single debugger interface while the system handles the complexity of switching between optimized and non-optimized versions based on debugging requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of information

If optimizations are disabled for relevant functions, then local variable inspection is improved, but build time deteriorates

Engineering Contradiction:
Improvelocal variable inspectionVSAvoidbuild time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

Instead of globally disabling optimizations for entire projects, the system applies non-optimized compilation only to specific functions or code sections that require debugging. This local approach allows the majority of the codebase to remain optimized while providing detailed debugging information only where needed, minimizing the impact on build time.

Inventive Principle:
Principle #3Local quality

4Loss of information

If code is recompiled to include debugging directives, then local variable inspection is improved, but productivity deteriorates

Engineering Contradiction:
Improvelocal variable inspectionVSAvoiddebugging productivity
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The system performs preliminary preparation by pre-compiling both optimized and non-optimized versions of the binary code before the debugging session begins. This advance preparation eliminates the need for time-consuming recompilation during debugging, as both versions are already available and the debugger can switch between them instantly based on debugging needs.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP4645098A1Systems and methods for facilitating seamless debugging while dynamically rerouting between an optimized binary and a non-optimized binary
Publication Date: 2025.11.05 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4645098A1 patent drawingFigure 1
  • EP4645098A1 patent drawingFigure 2A
  • EP4645098A1 patent drawingFigure 2B

AI summary

Systems, methods, and devices are provided for facilitating seamless debugging while dynamically rerouting between an optimized binary and a non-optimized binary. Embodiments receive an optimized binary and a non-optimized binary based on a binary and trigger redirection between the optimized binary and the non-optimized binary. The redirection is triggered based on one of: identifying a breakpoint within the optimized binary, encountering an updated Position-independent Portion within the non-optimized binary; or redirecting between the optimized binary and the non-optimized binary based on the trigger.