Process monitoring method, electronic equipment, storage medium and program product

By obtaining and converting the virtual address of the target variable in the Linux system, the problem of not being able to dynamically control and print debug variables in real time is solved, efficient process monitoring is achieved, and development efficiency and system performance are improved.

CN119149329APending Publication Date: 2024-12-17AUTOCHIPS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620639.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In Linux systems, during software development, debugging variables cannot be controlled dynamically in real time and printed these variables efficiently when problems arise, resulting in low efficiency problems.

Method used

By obtaining the user virtual address of the target variable, determining its corresponding physical address and kernel virtual address, using this information for process monitoring, realizing dynamic real-time monitoring of variables, avoiding calls to other interfaces, and improving development efficiency.

Benefits of technology

It realizes that when monitoring variables, you do not need to call other interfaces, and directly use variables, which improves the development efficiency of developers and does not affect the execution efficiency of the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149329A_ABST
    Figure CN119149329A_ABST
Patent Text Reader

Abstract

The invention provides a process monitoring method, electronic equipment, a storage medium and a program product, the process monitoring method comprises the following steps: obtaining first variable information of a target variable in a first process, the first variable information comprising a variable name and a user virtual address; determining a physical address corresponding to the user virtual address; determining a kernel virtual address corresponding to the physical address; and determining second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information. By means of the method, the virtual address of the variable in the user space and the virtual address of the variable in the kernel space both point to the same position in the actual memory, then dynamic real-time monitoring is achieved, other interfaces do not need to be called when the variable is monitored, the variable is directly and normally used, and the development efficiency of developers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application mainly relates to the technical field of computer software development, and in particular to a process monitoring method, electronic equipment, storage medium and program product. Background Art

[0002] Linux (Linux Is Not UniX), generally refers to GNU / Linux, is an open source and free operating system kernel. It was written by Finnish computer scientist Linus Torvalds in 1991 and has been continuously improved and developed in the following years. Linux was originally used for personal computers, but now it has become the main operating system for many types of hardware devices such as servers, mobile devices, supercomputers, etc. Linux is a free and open source UNIX-like operating system. Due to its low cost and high configurability, Linux is often used in embedded systems, such as set-top boxes, mobile phones and mobile devices. On mobile phones, Linux-based Android has become the main competitor of IOS.

[0003] Various problems are often encountered during software system development. How to find the root cause of these problems is a common problem for system development engineers. Offline debugging and on-site debugging are usually used for problem analysis. Offline debugging locates the problem by analyzing logs after the problem occurs. However, if there are too many logs, more CPU resources will be occupied and the operation efficiency will be affected. If there are too few logs, it is not easy to locate the problem. Therefore, some variables are often used to control whether the log is output, and it is impossible to dynamically control these variables used for debugging problems. On-site debugging records the debugging information in certain variables (for example, recording the current execution status of the program), and prints the values ​​of these variables to locate the problem when a problem occurs. There may be many variables, and frequent printing will also affect performance. Using gdb for on-site debugging will also affect the execution efficiency of the original process. In the Linux system, each process has an independent virtual address space, so other applications cannot directly access these variables, and cannot directly print the values ​​of these variables when a problem occurs. Summary of the invention

[0004] The main purpose of the present application is to provide a process monitoring method, electronic device, storage medium and program product to solve the problem of being unable to simultaneously and dynamically control the variables of the debugging problem in real time when analyzing the problem and to print these variables when the problem occurs and solve the problem of low efficiency.

[0005] To solve the above problems, the present application provides a process monitoring method, which includes: obtaining first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; determining a physical address corresponding to the user virtual address; determining a kernel virtual address corresponding to the physical address; determining second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0006] In one embodiment, determining the physical address corresponding to the user virtual address includes: obtaining a process page table; and searching the process page table for the physical address corresponding to the user virtual address.

[0007] In one embodiment, determining the kernel virtual address corresponding to the physical address includes: obtaining a kernel space page table; and searching the kernel virtual address corresponding to the physical address in the kernel space page table.

[0008] In one embodiment, the process monitoring method further includes: obtaining a debugging instruction sent by the second process, the debugging instruction including at least a variable name; determining corresponding second variable information according to the variable name; and debugging the target variable of the first process according to the debugging instruction and the second variable information.

[0009] In one embodiment, debugging the target variable of the first process according to the debugging instruction and the second variable information includes: searching for the target variable of the first process according to the second variable information; and debugging the target variable according to the debugging instruction.

[0010] In one embodiment, searching for the target variable of the first process according to the second variable information includes: obtaining the corresponding user virtual address according to the variable name passed by the second process; determining the physical address corresponding to the user virtual address; and searching for the kernel virtual address of the target variable of the corresponding first process according to the physical address to debug the target variable.

[0011] In one embodiment, the debugging instruction further includes setting a variable value; debugging the target variable according to the debugging instruction includes: modifying the value of the target variable to the set variable value.

[0012] To solve the above problems, the present application also provides an electronic device, which includes: an acquisition module, used to acquire first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; an address conversion module, used to determine a physical address corresponding to the user virtual address, and determine a kernel virtual address corresponding to the physical address; a determination module, used to determine second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0013] To solve the above problems, the present application also provides an electronic device, which includes: a processor and a memory, wherein the memory stores program data, and the processor is used to execute the program data to implement a process monitoring method as described in any one of the above embodiments.

[0014] To solve the above problems, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program data, and the program data is used to implement the process monitoring method described in any of the above embodiments when executed by a processor.

[0015] To solve the above problem, the present application also provides a computer program product, wherein when the computer program product is executed by a processor, it is used to implement the following process monitoring method:

[0016] Obtain first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; determine a physical address corresponding to the user virtual address; determine a kernel virtual address corresponding to the physical address; determine second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0017] Through the above method, the driver is used to obtain the corresponding physical address through the virtual address, and then this physical address is remapped to the virtual address space of the kernel, so that the virtual address of the variable in the user space and the virtual address of the kernel space both point to the same location in the actual memory, thereby realizing dynamic real-time monitoring, so that when monitoring variables, there is no need to call any other interfaces, and the variables can be used directly and normally, thereby improving the development efficiency of developers. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0019] Figure 1 It is a schematic diagram of the steps of an embodiment of a process monitoring method provided by the present application;

[0020] Figure 2 This is a first hypothetical schematic diagram of an embodiment of a process monitoring method provided by the present application;

[0021] Figure 3 is a second hypothetical schematic diagram of an embodiment of a process monitoring method provided by the present application;

[0022] Figure 4This is a schematic diagram of the debugging steps of an embodiment of a process monitoring method provided by the present application;

[0023] Figure 5 is a third hypothetical schematic diagram of an embodiment of a process monitoring method provided by the present application;

[0024] Figure 6 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0025] Figure 7 is a structural schematic diagram of a second embodiment of an electronic device provided by the present application;

[0026] Figure 8 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.

[0028] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0030] Modern operating systems generally use a virtual memory management mechanism, which requires support from the MMU (Memory Management Unit) in the processor. If the processor does not have an MMU, or has an MMU but is not enabled, the memory address sent by the CPU execution unit will be directly transmitted to the chip pins and received by the memory chip (hereinafter referred to as physical memory to distinguish it from virtual memory). This is called PA (Physical Address, hereinafter referred to as PA). If the processor has the MMU enabled, the memory address sent by the CPU execution unit will be intercepted by the MMU. The address from the CPU to the MMU is called a virtual address (Virtual Address, hereinafter referred to as VA), and the MMU translates this address into another address and sends it to the external address pin of the CPU chip, that is, mapping VA to PA.

[0031] In the Linux system, the virtual address space is divided into kernel space and user space. Each process has its own independent user space virtual memory, but the kernel space is shared by all processes; therefore, one process cannot directly access the private data of another process. If you want to access the private data of another process, the kernel provides a variety of inter-process communication methods, such as mapping the same physical memory to different processes for communication.

[0032] Various problems are often encountered during software system development. How to find the root cause of these problems is a common problem for system development engineers. Usually, software debugging is used, which generally refers to the process of reproducing software failures, locating the root cause of the failure, and ultimately solving software problems. Generally, debugging is performed in two ways: on-site debugging or offline debugging; among them, offline debugging: the more commonly used method of analyzing problems is to locate the problem by analyzing logs after the problem occurs, but if there are too many logs, it will occupy more CPU resources and affect the operating efficiency. If there are too few logs, it is not easy to locate the problem. Therefore, some variables are often used to control whether the logs are output. When you want to analyze a problem and need to release some logs, you only need to set the values ​​of some variables without re-modifying the code. A process cannot directly access the private data of another process. How to dynamically control these variables used to debug problems? On-site debugging: Another common method for debugging problems is to record debugging information in certain variables (for example, recording the current execution status of the program), and print the values ​​of these variables to locate the problem when a problem occurs. There may be many of these variables, and frequent printing will also affect performance. Using gdb for on-site debugging will also affect the execution efficiency of the original process; and each process in the Linux system has an independent virtual address space, so other applications cannot directly access these variables. How to print the values ​​of these variables when a problem occurs? The above two problems can be solved through inter-process communication, but the efficiency is not high and affects the performance of the software; among them, process communication (InterProcess Communication, IPC) refers to the exchange of information between processes. In fact, process synchronization and mutual exclusion are essentially a kind of process communication (this is why we will see semaphore and PV operations in the process communication mechanism later), but it only transmits semaphores. By modifying semaphores, processes can establish connections, coordinate and work together, but it lacks the ability to transmit data.

[0033] Therefore, the present application provides a process monitoring method, electronic device, storage medium and program product to solve the above problems.

[0034] See also Figure 1 As shown, Figure 1 1 is a schematic diagram of a process monitoring method according to an embodiment of the present invention; specifically, the process monitoring method comprises the following steps:

[0035] Step S10: obtaining first variable information of a target variable in a first process, wherein the first variable information includes a variable name and a user virtual address.

[0036] It can be understood that in a process that needs to be debugged, the virtual address and variable name corresponding to the variable that needs to be debugged or monitored are passed to the driver, wherein the variable name in one embodiment uses the string corresponding to the variable as the variable name of the variable.

[0037] It is understandable that when the program is running, after the virtual address space is established, no actual physical memory is allocated. Instead, when the process needs to actually access memory resources, the kernel's request paging mechanism will generate a page fault interrupt. Only then will the mapping of the virtual address and the physical address be established and the physical memory page be called in. In this way, we can ensure that our physical memory is only allocated when it is actually used, thereby avoiding the problem of memory waste.

[0038] The Linux kernel generally divides the processor's virtual address space into two parts. The larger part at the bottom is used for user processes, and the top is dedicated to the kernel. Although the lower part changes during context switching (between two user processes), the kernel part of the virtual address space always remains unchanged. The kernel space is the area accessed by the operating system kernel, which is independent of ordinary applications and is a protected memory space. The user space is the memory area accessible to ordinary applications.

[0039] Step S20: Determine the physical address corresponding to the user virtual address.

[0040] After the driver obtains the first variable information, it uses the user virtual address to find the corresponding physical address from the page table of the current process, for example, Figure 2 As shown, Figure 2 This is the first hypothetical schematic diagram of an embodiment of the process monitoring method provided by the present application; assuming that the name of the variable is "variable", the address is 0xff000, this address is the user-level virtual address of the current process, and assuming that the initial value of the variable is 0x123456, then corresponding to this virtual address, the physical address that can be obtained is 0x54.

[0041] Optionally, in one embodiment, determining the physical address corresponding to the user virtual address includes: obtaining a process page table; and searching the process page table for the physical address corresponding to the user virtual address.

[0042] Each virtual page of the virtual memory is mapped to a physical page. The mapping is achieved through a page table structure; specifically, the page table is an array of page table entries PTE (Page Table Entry); the page table entry PTE consists of a valid bit and an n-bit address field; the valid bit is 1, which means that the virtual page represented by this virtual address has been cached in the physical memory, and the address field will point to the location of the physical page. If it is 0, it means that the virtual page is still on the disk, so it will point to the location of the disk. If it is null, it means that the virtual page has not been allocated yet.

[0043] Step S30: Determine the kernel virtual address corresponding to the physical address.

[0044] Optionally, in one embodiment, determining the kernel virtual address corresponding to the physical address includes: obtaining a kernel space page table; and searching the kernel virtual address corresponding to the physical address in the kernel space page table. Figure 3 As shown, Figure 3 This is the second hypothetical schematic diagram of an embodiment of the process monitoring method provided in the present application; corresponding to the example in the above embodiment, the obtained physical address 0x54 is remapped to the page table of the kernel space, and a corresponding kernel virtual address of 0xffffdd00 can be obtained.

[0045] Step S40: determining the second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0046] It can be understood that the driver obtains the corresponding physical address through the virtual address, and then remaps this physical address to the virtual address space of the kernel. After this processing, the virtual address of the variable in the user space and the virtual address of the kernel space both point to the same location in the actual memory, so if one place is modified, the other place is directly visible.

[0047] Optionally, in one embodiment, the process monitoring method further includes a process of debugging the process. For details, see Figure 4 As shown, Figure 4 This is a flowchart of the debugging steps of an embodiment of the process monitoring method provided by the present application; the debugging process includes the following steps:

[0048] Step S50: Obtain the debugging instruction sent by the second process, where the debugging instruction at least includes a variable name.

[0049] In the above embodiment, the first variable information has been registered in the driver, so during the debugging process, the corresponding variable name can be directly called in the second process.

[0050] Step S60: Determine the corresponding second variable information according to the variable name.

[0051] Through the variable name, the corresponding registered second variable information is found in the driver to provide an object for subsequent modification or monitoring.

[0052] Step S70: Debug the target variable of the first process according to the debugging instruction and the second variable information.

[0053] Optionally, in one embodiment, debugging the target variable of the first process according to the debugging instruction and the second variable information includes: searching for the target variable of the first process according to the second variable information; and debugging the target variable according to the debugging instruction.

[0054] Optionally, in one embodiment, searching for the target variable of the first process according to the second variable information includes: obtaining the corresponding user virtual address according to the variable name transmitted by the second process; determining the physical address corresponding to the user virtual address; searching for the kernel virtual address of the corresponding target variable of the first process according to the physical address, so as to debug the target variable.

[0055] Optionally, in one embodiment, the debugging instruction further includes setting a variable value; debugging the target variable according to the debugging instruction includes: modifying the value of the target variable to the set variable value.

[0056] It can be understood that after registering the second variable information of the target variable to the driver, the target variable in the debugging process can be directly queried or modified in another process. Figure 5 As shown, Figure 5 This is the third hypothetical schematic diagram of an embodiment of the process monitoring method provided by the present application; corresponding to the example in the above embodiment, assuming that the value of the variable in the above process needs to be modified to 0x100, it is only necessary to pass "variable" and 0x100 to the driver, and the driver uses the kernel virtual address 0xffffdd00 of "variable" to change the value of "variable" to 0x100 to complete the modification.

[0057] Optionally, in one embodiment, considering the security issues in the process of monitoring or modifying the debugging, permissions are set for other processes that access the private data of the process to be debugged, and the permissions are that only the specified process can have the permission to access the debugging process to ensure its privacy and security. Similarly, in some processes, the read and write permissions of some variables can be restricted, for example, the permission settings of only read, only write, or both read and write are set to prevent possible misoperations from affecting the original process.

[0058] The present application also provides an electronic device 100, see Figure 6As shown, Figure 6 It is a structural diagram of an embodiment of an electronic device provided by the present application; specifically, the electronic device 100 includes: an acquisition module 110, an address conversion module 120 and a determination module 130; the corresponding relationship and function are: the acquisition module 110 is used to obtain the first variable information of the target variable in the first process, and the first variable information includes a variable name and a user virtual address; the address conversion module 120 is used to determine the physical address corresponding to the user virtual address, and determine the kernel virtual address corresponding to the physical address; the determination module 130 is used to determine the second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0059] It can be understood that, in one embodiment, the address translation module 120 is used to determine the physical address corresponding to the user virtual address, and determine the kernel virtual address corresponding to the physical address; specifically, the address translation module 120 obtains the process page table, and searches for the physical address corresponding to the user virtual address in the obtained process page table. Further, in one embodiment, confirming the corresponding kernel virtual address through the obtained physical address includes: obtaining the kernel space page table and searching for the kernel virtual address corresponding to the physical address in the kernel space page table.

[0060] In another embodiment, the debugging instruction sent by the second process can also be obtained by the acquisition module 110, and the debugging instruction at least includes a variable name; specifically, in one embodiment, the debugging instruction can also include setting a variable value. The corresponding second variable information is determined by the determination module 130 according to the variable name, and the target variable of the first process is debugged according to the debugging instruction and the second variable information. In other embodiments, different schemes are also available for debugging the target variable of the first process according to the debugging instruction and the second variable information. Specifically, in one embodiment, debugging the target variable of the first process according to the debugging instruction and the second variable information can also include: searching for the target variable of the first process according to the second variable information; debugging the target variable according to the debugging instruction. In another embodiment, debugging the target variable of the first process according to the debugging instruction and the second variable information can also include: obtaining the corresponding user virtual address according to the variable name passed by the second process; determining the physical address corresponding to the user virtual address; searching for the kernel virtual address of the corresponding target variable of the first process according to the physical address, so as to debug the target variable. It can be understood that, corresponding to the above acquisition module 110, the debugging instruction may also include setting a variable value. In the determination module 130, debugging the target variable according to the debugging instruction includes: modifying the value of the target variable to the set variable value.

[0061] The present application also provides an electronic device 100, see Figure 7 As shown, Figure 7 1 is a schematic diagram of the structure of the second embodiment of the electronic device provided by the present application; specifically, the electronic device 100 includes: a processor 140 and a memory 150, wherein the memory 150 stores program data, and the processor 140 is used to execute the program data to implement the following process monitoring method:

[0062] Obtain first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; determine a physical address corresponding to the user virtual address; determine a kernel virtual address corresponding to the physical address; determine second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0063] The present application also provides a computer readable storage medium 200, see Figure 8 As shown, Figure 8 2 is a schematic diagram of a structure of an embodiment of a computer-readable storage medium provided by the present application; specifically, the computer-readable storage medium 200 is used to store program data 210, and the program data 210 is used to implement the following process monitoring method when executed by a processor:

[0064] Obtain first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; determine a physical address corresponding to the user virtual address; determine a kernel virtual address corresponding to the physical address; determine second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0065] Through the above method, the process registers the variable information used for debugging into the driver, and the specified process can conveniently and efficiently modify the value of this variable, thereby achieving the purpose of dynamically controlling log output. This process does not involve complex processes such as inter-process communication and linked list query, which is more efficient than existing technologies and has little impact on the execution efficiency of the process; the system is simple to implement and highly portable. Therefore, debugging information can be output at any time without affecting program efficiency, which improves the development efficiency of developers.

[0066] Optionally, in one embodiment, the present application further provides a computer program product, which, when executed by a processor, is used to implement the following process monitoring method:

[0067] Obtain first variable information of a target variable in a first process, the first variable information including a variable name and a user virtual address; determine a physical address corresponding to the user virtual address; determine a kernel virtual address corresponding to the physical address; determine second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

[0068] It is understandable that the computer program product may be a computer program product contained in a tangible computer-readable medium, and the computer program product includes a program code for executing the above-mentioned interface testing method. In some embodiments, the computer program product can be downloaded and installed from the network, or copied, transferred, and installed between different computer hardware. Its wireless transmission method may include the Internet, Bluetooth, WIFI, etc., and its wired transmission method may include USB, lighting, type-C, etc.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0070] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0071] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0072] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A process monitoring method, characterized in that: The process monitoring method comprises: Acquire first variable information of a target variable in a first process, wherein the first variable information includes a variable name and a user virtual address; Determine the physical address corresponding to the user virtual address; Determine a kernel virtual address corresponding to the physical address; The second variable information of the target variable is determined according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

2. The process monitoring method according to claim 1, characterized in that: The determining of the physical address corresponding to the user virtual address includes: Get the process page table; The physical address corresponding to the user virtual address is searched in the process page table.

3. The process monitoring method according to claim 1, characterized in that: Determining the kernel virtual address corresponding to the physical address includes: Get the kernel space page table; The kernel virtual address corresponding to the physical address is searched in the kernel space page table.

4. The process monitoring method according to claim 1, characterized in that: The process monitoring method further comprises: Obtaining a debugging instruction sent by the second process, wherein the debugging instruction at least includes the variable name; Determine the corresponding second variable information according to the variable name; The target variable of the first process is debugged according to the debugging instruction and the second variable information.

5. The process monitoring method according to claim 4, characterized in that: The debugging of the target variable of the first process according to the debugging instruction and the second variable information includes: Searching for the target variable of the first process according to the second variable information; The target variable is debugged according to the debugging instruction.

6. The process monitoring method according to claim 4, characterized in that: The step of searching for the target variable of the first process according to the second variable information includes: Obtaining the corresponding user virtual address according to the variable name passed by the second process; Determine the physical address corresponding to the user virtual address; The kernel virtual address of the target variable of the first process corresponding to the physical address is searched to debug the target variable.

7. The process monitoring method according to claim 4, characterized in that: The debugging instructions also include setting variable values; The debugging of the target variable according to the debugging instruction includes: The value of the target variable is modified to the set variable value.

8. An electronic device, characterized in that: The electronic device comprises: An acquisition module, used for acquiring first variable information of a target variable in a first process, wherein the first variable information includes a variable name and a user virtual address; An address conversion module, used to determine the physical address corresponding to the user virtual address, and to determine the kernel virtual address corresponding to the physical address; A determination module is used to determine the second variable information of the target variable according to the variable name and the kernel virtual address, so as to monitor the target variable according to the second variable information.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein program data is stored in the memory, and the processor is used to execute the program data to implement the process monitoring method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program data, and the program data is used to implement the process monitoring method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that When the computer program product is executed by a processor, it is used to implement the process monitoring method as described in any one of claims 1-7.