Binary Mapping Rerouting for Optimized Code Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging optimized code is inefficient due to missing context information, erratic debugger stepping behavior, and the need for frequent recompilation, especially in game development, where non-optimized builds are too slow and optimized builds lack necessary debugging tools.

Innovation Solution

A system and method for dynamically mapping and rerouting between optimized and non-optimized binaries during debugging, using metadata and dependency graphs to seamlessly switch between the two, allowing breakpoints in optimized code to redirect to non-optimized code for context information and back, reducing the need for recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If non-optimized builds are used for debugging, then context information and debugging tools are available, but execution speed is too slow making games unplayable

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

Solution Approach 1:

The system segments the binary into optimized portions and non-optimized portions, allowing different sections to serve different purposes. The non-optimized portions provide debugging context while optimized portions maintain performance, resolving the contradiction between information availability and execution speed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different portions of the binary have different optimization qualities. Specifically optimized portions run at high speed while non-optimized portions provide debugging information. This local differentiation allows the system to have both fast execution and adequate debugging information simultaneously.

Inventive Principle:
Principle #3Local quality

2Speed

If optimized builds are used for debugging, then execution speed is improved, but debugger stepping behavior becomes erratic and context information is lost

Engineering Contradiction:
Improveexecution speedVSAvoiddebugger stepping behavior
Core Design Contradiction:
SpeedVSEase of operation

Solution Approach 1:

The binary is divided into optimized and non-optimized segments with distinct roles. The non-optimized segments act as stable anchor points for debugger operations, providing consistent stepping behavior while optimized segments maintain high execution speed, thus resolving the contradiction between speed and debugger reliability.

Inventive Principle:
Principle #1Segmentation

3Loss of information

If optimizations are disabled for relevant functions, then debugging context is preserved, but recompilation time increases

Engineering Contradiction:
Improvedebugging contextVSAvoidrecompilation time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The system performs preliminary compilation creating both optimized and non-optimized portions of the binary before debugging sessions begin. This pre-prepared structure eliminates the need for repeated recompilation during debugging, as the non-optimized portions are already available to provide debugging context without requiring additional build time.

Inventive Principle:
Principle #10Preliminary action

4Ease of operation

If breakpoints are set in optimized code, then debugging can proceed, but relevant context information is omitted from the optimized build

Engineering Contradiction:
Improvedebugging capabilityVSAvoidcontext information
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The non-optimized portions of the binary act as intermediaries that provide the missing context information. When debugging optimized code, the system can reference the corresponding non-optimized portions to retrieve context information that was stripped during optimization, thus resolving the contradiction between debugging capability and information availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250342109A1Systems and methods for dynamic mapping and rerouting of a non-optimized binary to an optimized binary
Publication Date: 2025.11.06 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250342109A1 patent drawing
  • US20250342109A1 patent drawing
  • US20250342109A1 patent drawing

AI summary

Systems, methods, and devices are provided for dynamically mapping and rerouting a non-optimized binary to an optimized binary. Embodiments identify a position-independent portion within a non-optimized binary and receive metadata associated with an optimized binary. Further, embodiments identify a location identifier within the optimized binary from the metadata and generate a delta value between the position-independent portion and the location identifier. Embodiments also update the position-independent portion with the delta value.