# US 2004/0083458 A1 · Method and apparatus for setting breakpoints when debugging integrated executables in a heterogeneous architecture

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2004/0083458 A1
- Document ID: US20040083458A1
- Status: Published application
- Kind: A1
- Application number: 10/280,677
- Filed: 2002-10-24
- Published: 2004-04-29
- Earliest claimed: 2002-10-24
- Assignees: International Business Machines Corporation
- Inventors: Michael Karl Gschwind; Kathryn M. O'Brien; John Kevin O'Brien; Valentina Salapura
- Web page: https://patentgrep.com/patent/US20040083458A1

## CPC

- G06F 11/362: Debugging of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides inserting and deleting a breakpoint in a parallel processing system. A breakpoint is inserted in a module loaded into the execution environment of an attached processor unit. The breakpoint can be inserted directly. Furthermore, the unloaded image of the module can also have a breakpoint associated with it. The breakpoint can be inserted directly into the module image, or a breakpoint request can be generated, and the breakpoint is inserted when the module is loaded into the execution environment of the attached processor unit.

## Claims

### Claim 1

A method for setting a breakpoint in a second execution environment, comprising:
selecting mapping indicia correlating to the breakpoint;
returning a memory address corresponding to the mapping indicia;
selecting a code module associated with execution in at least one second execution environment, wherein the selected code module contains the selected mapping indicia;
determining if the selected code module is loaded into the at least one second execution environment from at least one first execution environment;
setting the breakpoint in the at least one second execution environment at the returned memory address if the second execution environment contains the selected code module;
generating breakpoint indicia associated with setting the breakpoint if the second execution environment contains the selected code module; and
recording the breakpoint indicia, wherein the breakpoint indicia comprises information employable for loading the module to at least one second execution environment.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of selecting at least one code module directed at execution in a second execution environment further comprises selecting a plurality of code modules directed at execution in a second execution environment.

### Claim 3 (depends on 1)

The method of claim 1, wherein the memory address is embedded in the first execution environment and further comprising a step of copying the contents of the memory address into a separate information storage location.

### Claim 4 (depends on 1)

The method of claim 1, wherein the step of inserting the breakpoint comprises inserting a trap function.

### Claim 5 (depends on 1)

The method of claim 1, wherein the step of setting a breakpoint further comprises inserting an operation code into the corresponding memory address of the corresponding module image that is resident in the first execution environment.

### Claim 6 (depends on 1)

The method of claim 1, wherein the loaded code module is loaded to the second execution environment and further comprising determining the load memory address of a loaded code module in the second execution environment.

### Claim 7 (depends on 3)

The method of claim 3, wherein the step of inserting an operation code comprises employing the sum of both the address returned by the mapping address and the load memory address of a loaded code module.

### Claim 8 (depends on 1)

The method of claim 1, further comprising inserting the breakpoint at a corresponding memory address in the second execution environment if the memory address corresponds to the first execution environment.

### Claim 9 (depends on 1)

The method of claim 1, wherein recording information comprises modifying the corresponding image of the selected code module in the shared memory.

### Claim 10 (depends on 1)

The method of claim 1, wherein recording information comprises writing information to a breakpoint request table.

### Claim 11

A method for inserting breakpoints when loading modules from a first execution environment to a second execution environment, comprising:
loading a module into the second execution environment;
determining if a breakpoint is selected for the loaded module; and
inserting a breakpoint in the loaded module.

### Claim 12 (depends on 11)

The method of claim 11, wherein the step of determining comprises reading a breakpoint request table.

### Claim 13 (depends on 11)

The method of claim 11, further comprising a step of copying the contents of the memory address corresponding to the breakpoint of the loaded module to a separate information storage location.

### Claim 14

A method for deleting breakpoints in a parallel processor architecture, comprising:
selecting a breakpoint to be deleted;
determining if the selected breakpoint to be deleted correlates to a memory address in a first execution environment or a second execution environment;
deleting the breakpoint associated with the determined execution environment;
determining if a breakpoint request has been recorded for the breakpoint associated with the determined execution environment; and
deleting the breakpoint request if the breakpoint request has been recorded.

### Claim 15 (depends on 14)

The method of claim 14, further comprising inserting original information at the breakpoint.

### Claim 16 (depends on 14)

The method of claim 14, wherein the step of deleting a breakpoint in the determined environment further comprises deleting a breakpoint in a main module stored in a shared memory.

### Claim 17 (depends on 14)

The method of claim 14, wherein the step of deleting a breakpoint in the determined environment further comprises deleting a breakpoint in a module image corresponding to a load module, wherein the module image corresponding to the load module is stored in a shared memory.

### Claim 18 (depends on 14)

The method of claim 14, wherein the determined execution environment is the second execution environment and further comprising a step of querying the determined execution environment if the module in which the breakpoint is embedded is loaded into the second execution environment.

### Claim 19 (depends on 14)

The method of claim 14, wherein the step of deleting a breakpoint in the determined second execution environment comprises determining if the module associated with the breakpoint is loaded to the second execution environment.

### Claim 20

A method for setting breakpoints in a parallel processing environment, comprising:
selecting a breakpoint in code;
determining if a requested breakpoint correlates to a code address to be executed in a first execution environment or a second execution environment;
mapping the breakpoint to its corresponding memory address of code;
inserting an operation code at the address returned by the mapping if the breakpoint correlates to code targeted to the first execution environment; and
setting breakpoints of the code in the second execution environment if the breakpoint correlates to a module loaded into the second execution environment.

### Claim 21 (depends on 20)

The method of claim 20, further comprising recording information associated with the requested breakpoint, wherein the information comprises indicia employable for loading the module to at least one second execution environment.

### Claim 22 (depends on 20)

The method of claim 20, wherein the operation code comprises a trap function.

### Claim 23 (depends on 20)

The method of claim 20, wherein determining further comprises determining if a requested breakpoint maps to both the first execution environment and the second execution environment.

### Claim 24 (depends on 20)

The method of claim 20, further comprising a step of overwriting information in the first environment with the operation code.

### Claim 25 (depends on 24)

The method of claim 24, further comprising a step of copying the information to be overwritten into a separate information storage location before the step of overwriting information.

### Claim 26

A parallel processing system, comprising:
a first execution environment;
a second execution environment;
a breakpoint request table, wherein the breakpoint request table is located in the first execution environment;
a breakpoint request indicia, wherein the breakpoint request indicia is employable for extraction from the breakpoint request table, and the breakpoint request indicia is further employable for inserting a breakpoint at the address correlated to the breakpoint request indicia; and
a module with which the requested breakpoint indicia is associated, wherein the module is further employable for transmission from the first execution environment to the second execution environment.

### Claim 27

A computer program product for setting breakpoints in a parallel processing environment, the computer program product having a medium with a computer program embodied thereon, the computer program comprising:
computer code for selecting a breakpoint in code;
computer code for determining if a requested breakpoint correlates to a code address to be executed in a first execution environment or a second execution environment;
computer code for mapping the breakpoint to its corresponding memory address of code;
computer code for inserting an operation code at the address returned by the mapping if the breakpoint correlates to code targeted to the first execution environment; and
computer code for setting breakpoints of the code in the second execution environment if the breakpoint correlates to a module loaded into the second execution environment.

### Claim 28

A processor for setting breakpoints in a parallel processing environment, the processor including a computer program comprising:
computer code for selecting a breakpoint in code;
computer code for determining if a requested breakpoints correlates to a code address to be executed in a first execution environment or a second execution environment;
computer code for mapping the breakpoint to its corresponding memory address of code;
computer code for inserting an operation code at the address returned by the mapping if the breakpoint correlates to code targeted to the first execution environment; and
computer code for setting breakpoints of the code in the second execution environment if the breakpoint correlates to a module loaded into the second execution environment.
