Processor-Specific Breakpoint Tables for Shared Memory Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional debugging techniques, such as software and hardware breakpoints, face challenges when dealing with shared memory environments, particularly in multi-core processors, as they often lead to unnecessary halting of processors and interference between debugging sessions, and are less effective with self-modifying code.

Innovation Solution

The system employs address ranges defined by breakpoints to determine whether an executing instruction is within a specific processor's range, raising an emulation event only if it is outside, allowing for efficient debugging by halting only the intended processor and using hardware breakpoints for shared memory while maintaining software breakpoint flexibility for self-modifying code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If software breakpoints are inserted into shared memory code, then debugging capability is provided, but multiple processors may encounter the breakpoint causing unnecessary halts and interference between debugging sessions

Engineering Contradiction:
Improvedebugging capabilityVSAvoidprocessor execution continuity
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the breakpoint mechanism into processor-specific breakpoint tables. Each processor has its own breakpoint table that independently tracks breakpoints relevant to that processor. When a processor encounters a breakpoint, the system checks whether the breakpoint is marked as processor-specific or shared. This segmentation allows selective halting of only the intended processor while allowing other processors to continue execution, resolving the contradiction between providing debugging capability and maintaining processor execution continuity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by making breakpoint attributes processor-specific. Each breakpoint can be configured with a processor mask or identifier that specifies which processor(s) should halt upon encountering the breakpoint. This allows the breakpoint to have different behaviors for different processors - halting for the target processor while allowing others to pass through. This resolves the contradiction by enabling selective debugging without interfering with other processors' execution.

Inventive Principle:
Principle #3Local quality

2Measurement precision

If hardware breakpoints are used for shared memory, then breakpoint accuracy is improved, but self-modifying code can overwrite breakpoints causing debugging failures

Engineering Contradiction:
Improvebreakpoint accuracyVSAvoidbreakpoint stability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent applies preliminary action by establishing processor-specific breakpoint tables before code execution begins. These tables are populated with breakpoint information and processor association data prior to any self-modifying code execution. When self-modifying code executes and potentially overwrites memory, the pre-established processor-specific tables protect the breakpoint logic from being corrupted, as each processor's breakpoint state is independently tracked and protected. This resolves the contradiction between achieving breakpoint accuracy and maintaining breakpoint stability in the presence of self-modifying code.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism - the processor-specific breakpoint table - that mediates between the hardware breakpoint system and the self-modifying code. This intermediary layer translates hardware breakpoint signals into processor-specific actions, allowing the system to distinguish between breakpoints that should halt a processor versus those that should be ignored. The intermediary protects against self-modifying code by providing a buffered, processor-specific view of breakpoint state that is independent of the actual memory contents, resolving the contradiction between breakpoint accuracy and stability.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If all processors halt at breakpoints in shared memory, then complete debugging coverage is achieved, but runtime performance deteriorates due to unnecessary halts

Engineering Contradiction:
Improvedebugging coverageVSAvoidruntime performance
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the debugging responsibility by assigning processor-specific breakpoint tables to individual processors. This segmentation enables selective halting where only the processor for which a breakpoint is set will halt, while other processors continue execution. This resolves the contradiction between achieving complete debugging coverage and maintaining runtime performance, as each processor independently manages its own breakpoint halting behavior without affecting others.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamics by making breakpoint behavior adaptive and processor-specific rather than static and uniform. The breakpoint system dynamically determines which processor should halt based on the processor mask or identifier associated with each breakpoint. This dynamic approach allows the system to optimize runtime performance by preventing unnecessary halts in processors that do not require debugging, while still providing complete debugging coverage when needed. This resolves the contradiction between debugging coverage and runtime performance by making the halting behavior flexible and context-dependent.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8806446B2Methods and apparatus for debugging programs in shared memory
Publication Date: 2014.08.12 ANALOG DEVICES INC
  • US8806446B2 patent drawing
  • US8806446B2 patent drawing
  • US8806446B2 patent drawing

AI summary

A system debugging program code stored in shared memory and executed by multiple processors or processing cores. Exemplary operation includes determining if an address associated with an executing instruction is outside a first address range associated with the first processor, determining if the address associated with the executing instruction is outside a second address range associated with the second processor; and then raising an emulation event based on the first comparison but not the second comparison. Exemplary embodiments are also capable of identifying instructions corresponding to breakpoints which are executed by only one of multiple processors that execute program code stored in the shared memory.