# US 2026/0252468 A1 · Program debugging method, debugger, and compute device

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

- Number: US 2026/0252468 A1
- Document ID: US20260252468A1
- Status: Published application
- Kind: A1
- Application number: 19/643,964
- Filed: 2026-04-10
- Published: 2026-08-27
- Earliest claimed: 2023-10-13
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jinxin Luo; Zheng Yang; Chao Yuan
- Web page: https://patentgrep.com/patent/US20260252468A1

## CPC

- G06F 11/3644: {by instrumenting at runtime}
- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 11/362: Debugging of software
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application discloses a program debugging method, a debugger, and a compute device. The debugger determines that next program code of step-in is first glue code, where the first glue code is first-layer code in glue code between a first function and a second function, the first function calls the second function, and the first function and the second function are separately obtained through compilation by using different compiled languages; the debugger determines that the second function is a breakpoint of a program; and the debugger continuously executes the program to the breakpoint. For an operation step of a developer, after the first function is entered, the second function is reached.

## Claims

### Claim 1

A program debugging method, wherein the method comprises:
determining, by a debugger, that next program code of step-in is first glue code, wherein the first glue code is first-layer code in glue code between a first function and a second function, the first function calls the second function, and the first function and the second function are separately obtained through compilation by using different compiled languages;
determining, by the debugger, that the second function is a breakpoint of a program; and
continuously executing, by the debugger, the program to the breakpoint.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises:
determining, by the debugger, that next program code of step-out is second glue code, wherein the second glue code is last-layer code in the glue code between the first function and the second function; and
executing, by the debugger, N consecutive times of step-out on the program until the first function is returned, wherein N is an integer greater than or equal to 2.

### Claim 3 (depends on 1)

The method according to claim 1, wherein determining, by the debugger, that the next program code of step-in is the first glue code comprises:
if a function name corresponding to the next program code of step-in matches a function name of the first glue code, determining, by the debugger, that the next program code of step-in is the first glue code.

### Claim 4 (depends on 2)

The method according to claim 2, wherein determining, by the debugger, that the next program code of step-out is the second glue code comprises:
if a function name corresponding to the next program code of step-out matches a function name of the second glue code, determining, by the debugger, that the next program code of step-out is the second glue code.

### Claim 5 (depends on 2)

The method according to claim 2, wherein executing, by the debugger, the N consecutive times of step-out on the program until the first function is returned comprises:
executing, by the debugger, N−1 consecutive times of step-out on the program until the first glue code is reached; and
executing, by the debugger, one time of step-out based on the first glue code, to return to the first function.

### Claim 6 (depends on 5)

The method according to claim 5, wherein executing, by the debugger, the N−1 consecutive times of step-out on the program until the first glue code is reached comprises:
executing, by the debugger, the N−1 consecutive times of step-out on the program; and
if a function name corresponding to a current to-be-executed instruction matches a function name of the first glue code, determining, by the debugger, that the first glue code is reached.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the method further comprises:
obtaining, by the debugger, a target address of the second function, wherein the target address is used by the debugger to determine that the second function is the breakpoint.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the target address of the second function is stored on a stack, and obtaining, by the debugger, the target address of the second function comprises:
obtaining, by the debugger, a stack pointer, SP; and
determining, by the debugger, the target address of the second function based on an indication of the SP.

### Claim 9 (depends on 7)

The method according to claim 7, wherein the target address of the second function is stored in a target variable, and obtaining, by the debugger, the target address of the second function comprises:
obtaining, by the debugger, the target variable, wherein a variable value of the target variable comprises the target address of the second function.

### Claim 10

A debugger, wherein the debugger comprises:
a determining unit, configured to determine that next program code of step-in is first glue code, wherein the first glue code is first-layer code in glue code between a first function and a second function, the first function calls the second function, and the first function and the second function are separately obtained through compilation by using different compiled languages, wherein
the determining unit is further configured to determine that the second function is a breakpoint of a program; and
an execution unit, configured to continuously execute the program to the breakpoint.

### Claim 11 (depends on 10)

The debugger according to claim 10, wherein
the determining unit is further configured to determine that next program code of step-out is second glue code, wherein the second glue code is last-layer code in the glue code between the first function and the second function; and
the execution unit is further configured to execute N consecutive times of step-out on the program until the first function is returned, wherein N is an integer greater than or equal to 2.

### Claim 12 (depends on 10)

The debugger according to claim 10, wherein the determining unit is specifically configured to:
when a function name corresponding to the next program code of step-in matches a function name of the first glue code, determine that the next program code of step-in is the first glue code.

### Claim 13 (depends on 11)

The debugger according to claim 11, wherein the determining unit is specifically configured to:
when a function name corresponding to the next program code of step-out matches a function name of the second glue code, determine, by the debugger, that the next program code of step-out is the second glue code.

### Claim 14 (depends on 11)

The debugger according to claim 11, wherein the execution unit is specifically configured to:
execute N−1 consecutive times of step-out on the program until the first glue code is reached; and
execute one time of step-out based on the first glue code, to return to the first function.

### Claim 15 (depends on 14)

The debugger according to claim 14, wherein the execution unit is specifically configured to:
execute the N−1 consecutive times of step-out on the program; and
when a function name corresponding to a current to-be-executed instruction matches a function name of the first glue code, determine that the first glue code is reached.

### Claim 16 (depends on 10)

The debugger according to claim 10, wherein the debugger further comprises:
an obtaining unit, configured to obtain a target address of the second function, wherein the target address is used by the debugger to determine that the second function is the breakpoint.

### Claim 17 (depends on 16)

The debugger according to claim 16, wherein the obtaining unit is specifically configured to:
obtain a stack pointer SP; and
determine the target address of the second function based on an indication of the SP.

### Claim 18 (depends on 16)

The debugger according to claim 16, wherein the obtaining unit is specifically configured to:
obtain a target variable, wherein a variable value of the target variable comprises the target address of the second function.

### Claim 19

A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the non-transitory computer-readable storage medium is caused to:
determine, by a debugger, that next program code of step-in is first glue code, wherein the first glue code is first-layer code in glue code between a first function and a second function, the first function calls the second function, and the first function and the second function are separately obtained through compilation by using different compiled languages;
determine, by the debugger, that the second function is a breakpoint of a program; and
continuously execute, by the debugger, the program to the breakpoint.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein the non-transitory computer-readable storage medium is further caused to:
determine, by the debugger, that next program code of step-out is second glue code, wherein the second glue code is last-layer code in the glue code between the first function and the second function; and
execute, by the debugger, N consecutive times of step-out on the program until the first function is returned, wherein N is an integer greater than or equal to 2.
