Macro-Enclosed Function Stack Frames for Cross-Platform Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Porting open-source computer programs across different platforms faces challenges with build, performance, and runtime errors due to the complexity of understanding code structures and identifying bugs, especially when multiple macro condition sets are used.

Innovation Solution

A method is provided to generate a data structure that maps information records associated with computer instructions enclosed by macros, using a debugger to set breakpoints and build stack frames for efficient debugging by creating an index of identifiers based on debug information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If developers use multiple macro condition sets in source code for platform porting, then the code can be adapted to different platforms, but the complexity of understanding code structures and identifying bugs increases significantly

Engineering Contradiction:
Improveplatform adaptabilityVSAvoidcode structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the complex macro-conditioned source code into structured information records, where each record represents a discrete code element with its macro conditions separately identified. This segmentation allows developers to analyze code structure and macro conditions independently, reducing the perceived complexity while maintaining platform adaptability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary data structure (information records) that mediates between the complex macro-conditioned source code and the debugging process. This intermediary layer organizes code elements and their macro conditions in a structured format, making it easier to understand and debug without losing the platform adaptation capabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If developers manually analyze source code with multiple macro condition sets to identify bugs, then debugging can be performed, but the time required to understand code structures and locate defects increases

Engineering Contradiction:
Improvebug identification accuracyVSAvoiddebugging time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by automatically generating structured information records that organize code elements and their macro conditions before the debugging process begins. This pre-organization of data structure information eliminates the need for manual code analysis during debugging, significantly reducing debugging time while maintaining accurate bug identification.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback mechanisms where the structured information records provide immediate, organized feedback about code elements and their macro conditions during debugging. This structured feedback allows developers to quickly understand code structures and locate defects without manual analysis, reducing debugging time while ensuring accurate bug identification.

Inventive Principle:
Principle #23Feedback

3Ease of operation

If traditional debugging methods are used on macro-enclosed functions, then the debugging process can proceed, but the debugger cannot properly generate stack frames or set breakpoints for the enclosed code

Engineering Contradiction:
Improvedebugging operation simplicityVSAvoiddebugging functionality
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent uses structured information records as an intermediary between the debugger and macro-enclosed functions. These records contain the necessary information about code elements and their macro conditions, enabling the debugger to properly generate stack frames and set breakpoints for enclosed code while maintaining ease of operation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary actions by pre-processing source code to generate structured information records that contain all necessary debugging information before the actual debugging session. This allows the debugger to immediately access organized data about macro-enclosed functions, enabling proper stack frame generation and breakpoint setting without complex manual configuration.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12561229B2Stack frame generation for source code enclosed by macros
Publication Date: 2026.02.24 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12561229B2 patent drawing
  • US12561229B2 patent drawing
  • US12561229B2 patent drawing

AI summary

A computer implemented method for debugging computer instructions is provided. The method comprises using a number processors to receive a computer program, including a source code and generate a number of information records associated with a number of computer instructions in the source code, wherein at least one of the computer instructions comprises a function enclosed by a macro. The processors create a data structure based on the information records and generate an index of identifiers in the data structure based on debug information of the computer instructions, wherein the index comprises respective identifying entries for the computer instructions. The processors update information records according to the identifying entries in the data structure.