# US 2022/0283928 A1 · Kernel debugging system and method

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

- Number: US 2022/0283928 A1
- Document ID: US20220283928A1
- Status: Published application
- Kind: A1
- Application number: 17/686,126
- Filed: 2022-03-03
- Published: 2022-09-08
- Earliest claimed: 2021-03-04
- Assignees: Black Sesame Technologies Inc.
- Applicants: Black Sesame Technologies Inc.
- Inventors: Haiying Liu
- Web page: https://patentgrep.com/patent/US20220283928A1

## CPC

- G06F 11/362: Debugging of software
- G06F 11/3656: {using a specific debug interface}
- G06F 11/28: by checking the correct order of processing (G06F11/08 - G06F11/26 take precedence; monitoring patterns of pulse trains H03K5/19)
- G06F 11/3089: {Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents (software debugging using additional hardware using a specific debug interface G06F11/3656; performance evaluation by tracing or monitoring G06F11/3466)}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present application relates to a kernel debugging system and method. The kernel debugging system includes: a user interface module, the user interface module being configured to edit program codes and output an execution result of the program codes; a compilation module, the compilation module being configured to compile the program codes into object files; and a Kwasm engine, the Kwasm engine being directly installed in a system kernel of an operating system, and being configured to interpret and execute the object files in a kernel mode, so as to obtain the execution result of the program codes. On the basis of the kernel debugging system, a user can write program codes like writing a common application program, namely, the program codes can be run and executed in a system kernel without paying attention to details of the system kernel.

## Claims

### Claim 1

A kernel debugging system, comprising:
a user interface module, the user interface module being configured to edit program codes and output an execution result of the program codes;
a compilation module, the compilation module being configured to compile the program codes into object files; and
a Kwasm engine, the Kwasm engine being directly installed in a system kernel of an operating system and configured to interpret and execute the object files in a kernel mode, so as to obtain the execution result.

### Claim 2 (depends on 1)

The kernel debugging system according to claim 1, wherein the operating system is a Linux operating system.

### Claim 3 (depends on 1)

The kernel debugging system according to claim 1, wherein the object files are object files in a 64-bit wasm format.

### Claim 4 (depends on 1)

The kernel debugging system according to claim 1, wherein the Kwasm engine comprises:
a receiving module, the receiving module being configured to receive operation instructions and forward the operation instructions to a management module, wherein the operation instructions comprise operation instructions associated with the object files;
a management module, the management module being configured to provide auxiliary management of the operation instructions in response to receiving the operation instructions;
an interpreting and executing module, the interpreting and executing module being configured to interpret and execute the object files in the kernel mode, so as to generate the execution result; and
a sending module, the sending module being configured to send the execution result to the user interface module.

### Claim 5 (depends on 4)

The kernel debugging system according to claim 4, wherein the interpreting and executing module is implemented on the basis of a predetermined wasm interpreter, but a lower layer interface on which the interpreting and executing module depends is configured as a kernel interface.

### Claim 6 (depends on 5)

The kernel debugging system according to claim 5, wherein the interpreting and executing module is configured to support interpretation and execution on the object files in a 64-bit wasm format.

### Claim 7 (depends on 5)

The kernel debugging system according to claim 5, wherein the interpreting and executing module is configured to not support a floating-point operation function.

### Claim 8 (depends on 4)

The kernel debugging system according to claim 4, wherein the Kwasm engine further comprises a symbol table generation module, the symbol table generation module being configured to generate export function symbol tables on the basis of system symbol tables and kernel header files.

### Claim 9 (depends on 4)

The kernel debugging system according to claim 4, wherein the auxiliary management comprises: system state maintenance, file management, memory management, and message queue management.

### Claim 10 (depends on 1)

A kernel debugging method, wherein the kernel debugging method is executed by using the kernel debugging system according to claim 1, and the kernel debugging method further comprises:
editing program codes via a user interface module;
compiling the program codes into object files via a compilation module; and
interpreting and executing the object files via a Kwasm engine in a kernel mode, and sending an execution result of the program codes to the user interface module for displaying.
