CN106201896A - Adjustment method based on checkpoint, system and device under a kind of embedded environment - Google Patents
Adjustment method based on checkpoint, system and device under a kind of embedded environment Download PDFInfo
- Publication number
- CN106201896A CN106201896A CN201610595940.9A CN201610595940A CN106201896A CN 106201896 A CN106201896 A CN 106201896A CN 201610595940 A CN201610595940 A CN 201610595940A CN 106201896 A CN106201896 A CN 106201896A
- Authority
- CN
- China
- Prior art keywords
- checkpoint
- instruction
- debugging
- application program
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3644—Debugging of software by instrumenting at runtime
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Retry When Errors Occur (AREA)
Abstract
本发明公开了一种嵌入式环境下基于检查点的调试方法、系统及装置。所述调试方法包括宿主机向目标机发出第一指令,令所述目标机上的应用程序开始运行;宿主机从外部接收命令,并判断所述命令的类型;如果所述命令为保存命令,则进入下一步;如果所述命令为调试命令,则进入步骤(5);如果所述命令为恢复命令,则进入步骤(6);如果所述命令为退出命令,则进入步骤(8);否则进入步骤(7);判断所述应用程序是否运行结束,是则进入步骤(8),否则进入下一步;直至调试结束。本发明通过宿主机与目标机的交互,在目标机上设置检查点,使得重新开始调试时,应用程序可以直接恢复到检查点处运行,有效地缩短了嵌入式环境下应用程序的调试周期。
The invention discloses a debugging method, system and device based on a checkpoint in an embedded environment. The debugging method comprises that the host machine sends a first instruction to the target machine, so that the application program on the target machine starts to run; the host machine receives a command from the outside, and judges the type of the command; if the command is a save command, then Enter the next step; if the command is a debug command, then enter step (5); if the order is a recovery command, then enter step (6); if the order is an exit command, then enter step (8); otherwise Go to step (7); judge whether the application program is finished running, if yes, go to step (8), otherwise go to the next step; until the debugging is finished. The invention sets a check point on the target machine through the interaction between the host machine and the target machine, so that when debugging is restarted, the application program can be directly restored to run at the check point, effectively shortening the debugging cycle of the application program in the embedded environment.
Description
技术领域technical field
本发明属于计算机的应用程序调试方法,更具体地,涉及一种嵌入式环境下基于检查点的调试方法、系统及装置。The invention belongs to a computer application program debugging method, and more specifically relates to a checkpoint-based debugging method, system and device in an embedded environment.
背景技术Background technique
随着信息化,智能化,网络化的发展,嵌入式系统技术获得了广泛的发展空间。例如,在金融、交通、电力和军事等重要领域,嵌入式软件得到了广泛的应用,已经成为影响国家发展和安全的重要基础设施。其中许多关键的任务的完成均依赖于嵌入式应用程序,如果这些应用程序出现故障,会对生活和生产产生许多影响,提高嵌入式应用的稳定性和可靠性变得尤为重要。With the development of informatization, intelligence, and networking, embedded system technology has gained a wide range of development space. For example, in important fields such as finance, transportation, electric power and military affairs, embedded software has been widely used and has become an important infrastructure that affects national development and security. The completion of many key tasks depends on embedded applications. If these applications fail, it will have many impacts on life and production. It is particularly important to improve the stability and reliability of embedded applications.
有很多大型嵌入式应用程序的运行时间很长,一旦这些程序遇到故障,从头开始调试会浪费大量的等待时间。为了降低等待时间并且使得错误能够准确再现,程序执行的确定性需要得到保证。由于嵌入式系统比普通系统更加精简,对实时性有更高的要求,在嵌入式系统中检查点功能需要更快地执行速度来满足嵌入式系统的实时性,因此,相对于普通系统来说,实现起来更加困难。There are many large embedded applications that run for a long time. Once these programs encounter failures, debugging from scratch will waste a lot of waiting time. In order to reduce latency and enable accurate reproduction of errors, the determinism of program execution needs to be guaranteed. Since embedded systems are more streamlined than ordinary systems and have higher requirements for real-time performance, the checkpoint function in embedded systems needs to be executed faster to meet the real-time performance of embedded systems. Therefore, compared with ordinary systems , it is more difficult to realize.
现有的嵌入式环境下的检查点技术通常是对单个进程设置检查点,而对其并发的子进程在设置在检查点时不能保证全局一致性,每个进程保存了多个不同时刻的检查点文件,在检查点恢复的时候可能会出现重复卷回,最终使得应用程序恢复到应用程序运行的初始状态而非检查点保存的状态,从而使得检查点恢复操作失败。The existing checkpoint technology in the embedded environment usually sets a checkpoint for a single process, but the concurrent child process cannot guarantee global consistency when it is set at the checkpoint, and each process saves multiple checkpoints at different times Point files, repeated rollbacks may occur during checkpoint recovery, and eventually the application is restored to the initial state of the application instead of the state saved by the checkpoint, which makes the checkpoint recovery operation fail.
发明内容Contents of the invention
针对现有技术的以上缺陷或改进需求,本发明提供了一种基于检查点的调试方法、装置及系统,其目的在于通过宿主机与目标机的交互,在目标机上设置检查点,并用检查点文件保存应用程序对应的进程的上下文信息,使得重新开始调试时,应用程序可以直接恢复到检查点处运行,而不必从头开始程序的执行,从而减少了调试时的等待时间,可以有效地缩短应用程序的调试周期。In view of the above defects or improvement needs of the prior art, the present invention provides a debugging method, device and system based on a checkpoint, the purpose of which is to set a checkpoint on the target machine through the interaction between the host machine and the target machine, and use the checkpoint The file saves the context information of the process corresponding to the application program, so that when debugging is restarted, the application program can directly resume running at the checkpoint without having to start the program execution from the beginning, thereby reducing the waiting time during debugging and effectively shortening the application process. Program debugging cycle.
为实现上述目的,按照本发明的一个方面,提供了一种基于检查点的调试方法,包括以下步骤:In order to achieve the above object, according to one aspect of the present invention, a debugging method based on checkpoints is provided, comprising the following steps:
(1)宿主机向目标机发出第一指令,令目标机上的应用程序开始运行,令检查点的序号i=1;(1) The host machine sends the first instruction to the target machine, so that the application program on the target machine starts to run, and the sequence number i=1 of the checkpoint is made;
(2)宿主机接收外部的命令,并判断所述命令的类型;如果所述命令为保存命令,则进入步骤(3);如果所述命令为调试命令,则进入步骤(4);如果所述命令为恢复命令,则进入步骤(5);如果所述命令为退出命令,则入步骤(7);否则进入步骤(6);(2) The host machine receives an external command and judges the type of the command; if the command is a save command, then enter step (3); if the command is a debugging command, then enter step (4); if the Said command is a recovery command, then enters step (5); if said order is an exit command, then enters step (7); otherwise enters step (6);
(3)宿主机向目标机发出第二指令,令目标机在应用程序的当前位置创建第i检查点,并将所述应用程序对应的进程的上下文信息保存于对应第i检查点的第i检查点文件中;i=i+1,返回步骤(2);所述进程包括父进程以及所述父进程的子进程;(3) The host machine sends a second instruction to the target machine, so that the target machine creates the i-th checkpoint at the current location of the application program, and saves the context information of the process corresponding to the application program in the i-th checkpoint corresponding to the i-th checkpoint In the checkpoint file; i=i+1, return to step (2); the process includes the parent process and the child process of the parent process;
(4)宿主机向目标机发出第三指令,令所述目标机在应用程序的当前位置调试,并向宿主机返回调试结果,宿主机将所述调试结果输出,返回步骤(2);(4) host machine sends the 3rd instruction to target machine, makes described target machine debug at the current position of application program, and returns debugging result to host machine, and host machine outputs described debugging result, returns to step (2);
(5)宿主机向目标机发出第四指令,令所述目标机从第j检查点文件中恢复应用程序对应的进程的上下文信息,并将应用程序运行的当前位置恢复至第j检查点,j为1~i的整数,返回步骤(2);(5) The host machine sends a fourth instruction to the target machine, so that the target machine restores the context information of the process corresponding to the application program from the jth checkpoint file, and restores the current position of the application program to the jth checkpoint, j is an integer from 1 to i, return to step (2);
(6)宿主机向外部发出报错指令,返回步骤(2);(6) The host machine sends an error report command to the outside, and returns to step (2);
(7)宿主机向目标机发出第五指令,结束目标机上应用程序的运行。(7) The host machine sends a fifth instruction to the target machine to end the running of the application program on the target machine.
优选地,在所述步骤(1)之前还包括,将宿主机连接至目标机。Preferably, before the step (1), it also includes connecting the host machine to the target machine.
优选地,所述应用程序包括目标应用程序以及并发应用程序。Preferably, the applications include target applications and concurrent applications.
优选地,所述步骤(3)中的上下文信息包括进程的状态、进程的用户变量、进程在寄存器中的地址、进程在进程表项的用户栈以及内核栈中的地址。Preferably, the context information in the step (3) includes the state of the process, the user variable of the process, the address of the process in the register, the address of the process in the user stack of the process entry and the kernel stack.
作为进一步优选地,所述进程的状态包括进程头、进程的线程、进程的线程的父子关系、进程的线程的共享数据和私有数据。As further preferably, the state of the process includes a process header, a thread of the process, a parent-child relationship of the thread of the process, shared data and private data of the thread of the process.
优选地,所述步骤(4)具体包括如下子步骤:Preferably, the step (4) specifically includes the following sub-steps:
(4.1)根据调试命令的种类,宿主机向目标机发出第三指令,令所述目标机在应用程序运行的当前位置进行相应种类的调试;(4.1) According to the type of the debugging command, the host machine sends a third instruction to the target machine to make the target machine perform corresponding type of debugging at the current position where the application program is running;
(4.2)在设定的时间段Δt内,宿主机判断是否收到目标机返回的调试结果,是则进入步骤(4.3),否则返回步骤(4.1);(4.2) Within the set time period Δt, the host machine judges whether it has received the debugging result returned by the target machine, if yes, enter step (4.3), otherwise return to step (4.1);
(4.3)宿主机将所述调试结果反馈给外部,返回步骤(2)。(4.3) The host computer feeds back the debugging result to the outside, and returns to step (2).
作为进一步优选地,所述调试命令的种类包括条件断点、进入函数、跳出函数、设置观察点、线程核绑定、插入断点、查询断点、单步执行、持续执行、执行至结束、删除断点、查看变量、查看线程运行核、获取核运行线程或统计线程运行时间。As further preferably, the types of debugging commands include conditional breakpoints, entering functions, exiting functions, setting watchpoints, thread core binding, inserting breakpoints, querying breakpoints, single-step execution, continuous execution, execution to the end, Delete breakpoints, view variables, view thread running cores, get core running threads or count thread running time.
按照本发明的另一方面,还提供了一种基于检查点的调试系统,包括宿主机以及目标机,所述目标机包括解析模块、运行模块、检查点模块以及调试模块;According to another aspect of the present invention, a checkpoint-based debugging system is also provided, including a host machine and a target machine, and the target machine includes an analysis module, an operation module, a checkpoint module, and a debugging module;
所述宿主机用于向解析模块发出第一指令、第二指令、第三指令、第四指令以及第五指令,同时接收解析模块返回的运行结果以及调试结果;The host computer is used to send the first instruction, the second instruction, the third instruction, the fourth instruction and the fifth instruction to the analysis module, and simultaneously receive the operation result and the debugging result returned by the analysis module;
所述解析模块用于将第一指令以及第五指令发送给运行模块,第二指令以及第四指令发送给检查点模块,第三指令发送给调试模块;并将运行结果以及调试结果反馈至宿主机;The parsing module is used to send the first instruction and the fifth instruction to the running module, the second instruction and the fourth instruction to the checkpoint module, and the third instruction to the debugging module; and feed back the running result and the debugging result to the host host;
所述运行模块用于根据第一指令运行应用程序,以及根据第五指令结束应用程序;并在应用程序运行结束时,向解析模块输出运行结果;同时根据恢复指令,将应用程序运行的当前位置恢复至检查点处;The running module is used to run the application program according to the first instruction, and end the application program according to the fifth instruction; and when the application program finishes running, output the running result to the parsing module; Revert to the checkpoint;
所述检查点模块用于根据第二指令,在应用程序的当前位置创建检查点,并将所述应用程序对应的进程的上下文信息保存于检查点文件中,同时根据第四指令,从检查点文件中恢复应用程序对应的进程的上下文信息,并向运行模块发出恢复指令;The checkpoint module is used to create a checkpoint at the current location of the application program according to the second instruction, and save the context information of the process corresponding to the application program in the checkpoint file, and at the same time, according to the fourth instruction, from the checkpoint Restore the context information of the process corresponding to the application program in the file, and issue a restore instruction to the running module;
所述调试模块用于在应用程序的当前位置调试,并向解析模块输出调试结果。The debugging module is used for debugging at the current position of the application program, and outputs the debugging result to the parsing module.
按照本发明的另一方面,还提供了一种用于上述调试装置的调试装置,包括解析模块、运行模块、检查点模块以及调试模块;According to another aspect of the present invention, there is also provided a debugging device for the above debugging device, including an analysis module, a running module, a checkpoint module and a debugging module;
所述解析模块用于将第一指令以及第五指令发送给运行模块,第二指令以及第四指令发送给检查点模块,第三指令发送给调试模块;并将运行结果以及调试结果反馈至宿主机;The parsing module is used to send the first instruction and the fifth instruction to the running module, the second instruction and the fourth instruction to the checkpoint module, and the third instruction to the debugging module; and feed back the running result and the debugging result to the host host;
所述运行模块用于根据第一指令运行应用程序,以及根据第五指令结束应用程序;并在应用程序运行结束时,向解析模块输出运行结果;同时根据恢复指令,将应用程序运行的当前位置恢复至检查点处;The running module is used to run the application program according to the first instruction, and end the application program according to the fifth instruction; and when the application program finishes running, output the running result to the parsing module; Revert to the checkpoint;
所述检查点模块用于根据第二指令,在应用程序的当前位置创建检查点,并将所述应用程序对应的进程的上下文信息保存于检查点文件中,同时根据第四指令,从检查点文件中恢复应用程序对应的进程的上下文信息,并向运行模块发出恢复指令;The checkpoint module is used to create a checkpoint at the current location of the application program according to the second instruction, and save the context information of the process corresponding to the application program in the checkpoint file, and at the same time, according to the fourth instruction, from the checkpoint Restore the context information of the process corresponding to the application program in the file, and issue a restore instruction to the running module;
所述调试模块用于在应用程序的当前位置调试,并向解析模块输出调试结果。The debugging module is used for debugging at the current position of the application program, and outputs the debugging result to the parsing module.
总体而言,通过本发明所构思的以上技术方案与现有技术相比,由于在调试过程中设置检查点,能够取得下列有益效果:Generally speaking, compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects due to the setting of checkpoints in the debugging process:
1、通过宿主机与目标机的交互,并直接在目标机上设置检查点以及创建检查点文件,使得在嵌入式环境下进行调试时,应用程序可以直接恢复到检查点对应的应用程序的位置处运行,而不必从头开始执行应用程序,从而减少了调试时的等待时间,可以有效地缩短应用程序的调试周期;1. Through the interaction between the host machine and the target machine, and directly set the checkpoint and create the checkpoint file on the target machine, so that when debugging in the embedded environment, the application program can be directly restored to the location of the application program corresponding to the checkpoint Run without having to execute the application program from scratch, thereby reducing the waiting time during debugging, and can effectively shorten the debugging cycle of the application program;
2、本发明将进程的状态、进程的用户变量、进程在寄存器中的地址、进程在进程表项的用户栈以及内核栈中的地址均作为上下文信息保存于检查点文件中,使得本发明不依赖于操作系统运行,目标机既可以运行在X86等英特尔芯片架构上,也可以运行在国产龙芯等mips架构上,具有广泛的适用性;2. The present invention saves the state of the process, the user variable of the process, the address of the process in the register, the address of the process in the user stack of the process table item and the kernel stack as context information in the checkpoint file, so that the present invention does not Depending on the operation of the operating system, the target machine can run on both Intel chip architectures such as X86 and mips architectures such as domestic Loongson, which has wide applicability;
3、本发明可以根据外部指令,对目标机发出多种调试命令,适用于多种调试类型;3. The present invention can issue various debugging commands to the target machine according to external instructions, and is applicable to various debugging types;
4、本发明可以设置多个检查点,并从不同的检查点文件中进行选择恢复,从而有针对性地对应用程度进行调试,进一步缩短了调试时间;4. The present invention can set multiple checkpoints, and select and restore from different checkpoint files, so as to debug the application level in a targeted manner, and further shorten the debugging time;
5、本发明在检查点文件中保存的上下文信息,不仅包括目标应用程序对应的进程的上下文信息,还包括与目标应用程序并发运行的并发应用程序的进程上下文信息,并且在进行检查点的恢复操作时,恢复所有的应用程序,以保持全局一致性状态,从而实现了多进程协同检查点操作。5. The context information saved in the checkpoint file in the present invention not only includes the context information of the process corresponding to the target application, but also includes the process context information of the concurrent application running concurrently with the target application, and the recovery of the checkpoint During operation, all applications are restored to maintain a globally consistent state, thereby enabling multi-process coordinated checkpoint operations.
附图说明Description of drawings
图1为本发明调试装置结构示意图;Fig. 1 is the structural representation of debugging device of the present invention;
图2为本发明实施例1调试方法的流程示意图;Fig. 2 is a schematic flow chart of the debugging method of Embodiment 1 of the present invention;
图3为本发明实施例1运行应用程序流程示意图;Fig. 3 is a schematic flow chart of running an application program in Embodiment 1 of the present invention;
图4为本发明实施例1设置检查点流程示意图;Fig. 4 is a schematic flow chart of setting checkpoints in Embodiment 1 of the present invention;
图5为本发明实施例1调试应用程序流程示意图;FIG. 5 is a schematic diagram of the process of debugging an application program according to Embodiment 1 of the present invention;
图6为本发明实施例1恢复检查点流程示意图。FIG. 6 is a schematic diagram of a process of restoring a checkpoint according to Embodiment 1 of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.
本发明公开了一种基于检查点的调试方法以及调试系统,所述调试系统包括宿主机以及目标机,所述目标机包括解析模块、运行模块、检查点模块以及调试模块;宿主机连接解析模块,解析模块分别与运行模块、检查点模块以及调试模块相连,运行模块与检查点模块以及调试模块相连;The invention discloses a debugging method and a debugging system based on a checkpoint. The debugging system includes a host machine and a target machine, and the target machine includes an analysis module, an operation module, a checkpoint module and a debugging module; the host machine connects the analysis module , the parsing module is connected with the running module, the checkpoint module and the debugging module respectively, and the running module is connected with the checkpoint module and the debugging module;
所述调试方法具体包括以下步骤:The debugging method specifically includes the following steps:
(0)远程连接宿主机与目标机,具体包括如下子步骤:(0) Remotely connect the host machine and the target machine, specifically including the following sub-steps:
(0.1)宿主机从外部接收远程登陆的命令,并向目标机发出连接指令,所述远程登陆的命令的参数为所述目标机的用户名以及IP地址;(0.1) The host machine receives the command of the remote login from the outside, and sends a connection instruction to the target machine, and the parameters of the command of the remote login are the user name and the IP address of the target machine;
(0.2)宿主机从外部接收解密的命令,并向目标机发出解密指令,与所述目标机建立远程连接;(0.2) The host machine receives the decrypted command from the outside, and sends a decryption command to the target machine, and establishes a remote connection with the target machine;
(1)宿主机向解析模块发出第一指令,解析模块将所述第一指令解析后发送给运行模块,令所述目标机上的应用程序开始运行;所述应用程序包括目标应用程序以及并发应用程序,目标应用程序运行的同时就会将目标应用程序的进程号记录于目标机的进程号文件中,而并发应用程序并非一定和目标应用程序同时运行,但只要开始运行,该并发应用程序就会向目标应用程序发送信号,从而在目标机的进程号文件中留下所述并发应用程序所对应的进程的进程号;(1) The host computer sends the first instruction to the analysis module, and the analysis module sends the first instruction to the running module after analyzing the first instruction, so that the application program on the target computer starts running; the application program includes the target application program and concurrent applications When the target application is running, the process number of the target application will be recorded in the process number file of the target machine, and the concurrent application does not necessarily run at the same time as the target application, but as long as it starts running, the concurrent application will be A signal will be sent to the target application, thereby leaving the process number of the process corresponding to the concurrent application in the process number file of the target machine;
(2)宿主机接收外部的命令,并判断所述命令的类型;如果所述命令为保存命令,则进入步骤(3);如果所述命令为调试命令,则进入步骤(4);如果所述命令为恢复命令,则进入步骤(5);如果所述命令为退出命令,则入步骤(7);否则该命令的类型宿主机无法识别,进入步骤(6);(2) The host machine receives an external command and judges the type of the command; if the command is a save command, then enter step (3); if the command is a debugging command, then enter step (4); if the Said command is a recovery command, then enters step (5); if said order is an exit command, then enters step (7); otherwise the type host computer of this order cannot be recognized, enters step (6);
(3)宿主机向解析模块发出第二指令,解析模块将所述第一指令解析后发送给检查点模块,令检查点模块在应用程序的当前位置创建第i检查点,并根据进程号文件中所记录的进程号,将所述应用程序对应的进程的上下文信息保存于第i检查点文件中;所述进程包括父进程以及所述父进程的子进程;i=i+1,返回步骤(2);所述上下文信息包括进程的状态(如进程头、进程的线程、进程的线程的父子关系、共享数据和私有数据)、进程的用户变量、进程在寄存器中的地址、进程在进程表项的用户栈以及内核栈中的地址;由于在所述步骤(2)(3) The host computer sends a second instruction to the analysis module, and the analysis module analyzes the first instruction and sends it to the checkpoint module, so that the checkpoint module creates the i-th checkpoint at the current position of the application program, and according to the process number file The process number recorded in, the context information of the process corresponding to the application is stored in the i-th checkpoint file; the process includes the parent process and the child process of the parent process; i=i+1, return to the step (2); The context information includes the state of the process (as the thread of the process head, the process, the parent-child relationship of the thread of the process, shared data and private data), the user variable of the process, the address of the process in the register, the address of the process in the process The user stack and the address in the kernel stack of the entry; because in the step (2)
(4)宿主机向目标机发出第三指令,令所述目标机在应用程序的当前位置调试,并向宿主机返回调试结果,宿主机将所述调试结果输出至外部,返回步骤(2);具体包括如下子步骤:(4) The host machine sends a third instruction to the target machine, so that the target machine is debugged at the current position of the application program, and returns the debugging result to the host machine, and the host machine outputs the debugging result to the outside, and returns to step (2) ; Concretely include the following sub-steps:
(4.1)根据调试命令的种类,宿主机向解析模块发出第三指令,解析模块将所述第三指令解析后发送给调试模块,令所述调试模块在应用程序运行的当前位置进行相应种类的调试,获得调试结果后输出至解析模块,解析模块将调试结果解析后发送给宿主机;所述调试命令的种类包括条件断点、进入函数、跳出函数、设置观察点、线程核绑定、插入断点、查询断点、单步执行、持续执行、执行至结束、删除断点、查看变量、查看线程运行核、获取核运行线程或统计线程运行时间;(4.1) According to the type of debugging command, the host computer sends a third instruction to the analysis module, and the analysis module sends the third instruction to the debugging module after analyzing the third instruction, so that the debugging module performs corresponding types of commands at the current position where the application program is running. Debugging, after obtaining the debugging results, output them to the analysis module, and the analysis module will analyze the debugging results and send them to the host computer; the types of debugging commands include conditional breakpoints, entering functions, exiting functions, setting observation points, thread core binding, inserting Breakpoints, query breakpoints, single-step execution, continuous execution, execution to the end, delete breakpoints, view variables, view thread running cores, get core running threads or count thread running time;
(4.2)在0.3s~1.0s内,宿主机判断是否收到解析模块返回的调试结果,是则进入步骤(4.3),否则返回步骤(4.1);(4.2) Within 0.3s~1.0s, the host machine judges whether it has received the debugging result returned by the analysis module, if yes, enter step (4.3), otherwise return to step (4.1);
(4.3)宿主机将所述调试结果反馈给外部,返回步骤(2);(4.3) The host computer feeds back the debugging result to the outside, and returns to step (2);
(5)宿主机向解析模块发出第四指令,解析模块将所述第四指令解析后发送给检查点模块,令所述检查点模块从第j检查点文件中恢复应用程序对应的进程的上下文信息,并向运行模块发出恢复指令,运行模块令应用程序运行的当前位置恢复至第j检查点,j为1~i的整数,返回步骤(2);(5) The host sends a fourth instruction to the parsing module, and the parsing module parses the fourth instruction and sends it to the checkpoint module, so that the checkpoint module restores the context of the process corresponding to the application program from the jth checkpoint file information, and send a recovery instruction to the running module, and the running module restores the current position of the application program to the jth checkpoint, where j is an integer from 1 to i, and returns to step (2);
(6)宿主机向外部发出报错指令,返回步骤(2);(6) The host machine sends an error report command to the outside, and returns to step (2);
(7)宿主机向解析模块发出第五指令,解析模块将所述第五指令解析后发送给运行模块,运行模块结束应用程序的运行。(7) The host sends a fifth instruction to the parsing module, and the parsing module parses the fifth instruction and sends it to the running module, and the running module ends the running of the application program.
在整个调试过程中,除进行调试以及恢复检查点的时刻,其余时刻应用程序持续运行,直至运行结束;在步骤(5)中可根据需要恢复的应用程序的位置选择检查点;如果应用程序已经运行至某个位置之后,但在该位置需要创建检查点而未创建时,可返回步骤(1),将应用程序从头开始运行。实施例1During the entire debugging process, except for the moment of debugging and restoring the checkpoint, the application program continues to run until the end of the operation; in step (5), the checkpoint can be selected according to the position of the application program to be restored; if the application program has been After running to a certain location, but when a checkpoint needs to be created at that location but has not been created, you can go back to step (1) and run the application from scratch. Example 1
该实施例的测试环境如下:The test environment of this embodiment is as follows:
宿主机:CPU为Intel i5-4590@3.30GHz,内存8G,操作系统为Ubuntu 14.04;目标机:CPU为龙芯3A,具有多核芯片,内存型号DDR2 800Mhz(1G),操作系统Debian。Host machine: CPU is Intel i5-4590@3.30GHz, memory 8G, operating system is Ubuntu 14.04; target machine: CPU is Loongson 3A, with multi-core chip, memory type DDR2 800Mhz (1G), operating system Debian.
Linux下的主流调试器如GDB,只能运行在x86系统中。在本实施例中mips架构的嵌入式系统,采用精简指令集,相比在x86架构的普通系统上实现检查点系统的难点是:1、需要在精简的检查点系统过程的同时,保证检查点的功能都能实现;2、需要更快的运行速度,来满足嵌入式系统对实时性更高的要求。3、mips架构和x86架构的指令集不同,寄存器等地址不同,导致在mips架构上实现检查点功能更加困难。The mainstream debuggers under Linux, such as GDB, can only run on x86 systems. In this embodiment, the embedded system of the mips architecture adopts a simplified instruction set. Compared with the ordinary system of the x86 architecture, the difficulties in implementing the checkpoint system are: 1. It is necessary to ensure the checkpoint while streamlining the checkpoint system process. All functions can be realized; 2. Faster running speed is needed to meet the higher real-time requirements of embedded systems. 3. The instruction sets of the mips architecture and the x86 architecture are different, and the addresses of registers are different, which makes it more difficult to implement the checkpoint function on the mips architecture.
如图2所示,本实施例为对被调试应用程序test.c的一次调试过程,主要包括建立远程连接、运行应用程序、设置检查点、调试应用程序、恢复检查点等步骤,具体如下:As shown in Figure 2, this embodiment is a debugging process to the debugged application program test.c, which mainly includes steps such as establishing a remote connection, running the application program, setting a checkpoint, debugging the application program, and restoring the checkpoint, as follows:
(1)建立远程连接,包括下述子步骤:(1) establish a remote connection, including the following sub-steps:
(1.1)通过宿主机命令行输入ssh命令与目标机建立远程连接,命令的参数为目标机的用户名以及IP地址,然后转步骤(1.2);(1.1) Enter the ssh command to establish a remote connection with the target machine through the command line of the host machine. The parameters of the command are the user name and IP address of the target machine, and then go to step (1.2);
(1.2)调试人员在宿主机上输入目标机的登录密码,使得宿主机与目标机完成建立远程连接,然后转步骤(2);(1.2) The debugger enters the login password of the target machine on the host machine, so that the host machine and the target machine complete the establishment of a remote connection, and then go to step (2);
(2)运行应用程序,如图3所示,包括下述子步骤:(2) Run the application program, as shown in Figure 3, including the following sub-steps:
(2.1)判断目标机上是否已经加载检查点内核模块epcr_imports.ko和epcr.ko,如果已经加载就直接转步骤(2.2),如果没有就利用目标机命令行执行加载检查点内核模块脚本./sh epcr_module.sh,将检查点内核模块加载到内核,然后转步骤(2.2);(2.1) Determine whether the checkpoint kernel modules epcr_imports.ko and epcr.ko have been loaded on the target machine. If they have been loaded, go to step (2.2). If not, use the command line of the target machine to execute the load checkpoint kernel module script./sh epcr_module.sh, load the checkpoint kernel module into the kernel, and then go to step (2.2);
(2.2)判断目标机上检查点的辅助服务器server_for_checkpoint是否运行,如果已经运行就直接转步骤(2.3),否则就利用目标机命令行终端执行命令./server_for_checkpoint启动辅助服务器,然后转步骤(2.3);(2.2) Determine whether the auxiliary server server_for_checkpoint of the checkpoint on the target machine is running, if it has been running, it will directly go to step (2.3), otherwise it will use the command line terminal of the target machine to execute the command ./server_for_checkpoint to start the auxiliary server, and then go to step (2.3);
(2.3)利用目标机命令行执行应用程序可执行文件./test,启动应用程序,然后转步骤(2.4);(2.3) Execute the application program executable file ./test by using the command line of the target machine, start the application program, and then turn to step (2.4);
(2.4)启动宿主机上的检查点客户端./client_for_checkpoint,连接到目标机上检查点服务器端server_for_checkpoint,发送步骤(2.3)执行的应用程序的文件名test到检查点服务器端,由检查点服务器端查找目标机上对应应用程序的进程号,然后将进程号发送给检查点客户端client_for_checkpoint,然后转步骤(3);(2.4) Start the checkpoint client ./client_for_checkpoint on the host machine, connect to the checkpoint server server_for_checkpoint on the target machine, send the file name test of the application program executed in step (2.3) to the checkpoint server end, and the checkpoint server end Find the process number of the corresponding application on the target machine, then send the process number to the checkpoint client client_for_checkpoint, and then go to step (3);
(3)目标机根据调试人员输入的命令判断是否需要设置检查点;当调试人员需要设置检查点时,则进入下一步,否则进入步骤(5);(3) The target machine judges whether a checkpoint needs to be set according to the command input by the debugger; when the debugger needs to set a checkpoint, then enter the next step, otherwise enter step (5);
(4)设置检查点,如图4所示,包括下述子步骤:(4) Checkpoint is set, as shown in Figure 4, including the following sub-steps:
(4.1)宿主机向目标机输入检查点命令./checkpoint pid–backup,创建检查点保存进程,所述检查点保存进程的参数为步骤(2.4)获取的进程号pid,该进程号对应的进程为第一目标进程,然后转步骤(4.2);(4.1) The host machine inputs the checkpoint command ./checkpoint pid–backup to the target machine to create a checkpoint preservation process. The parameters of the checkpoint preservation process are the process number pid obtained in step (2.4), and the process corresponding to the process number Be the first target process, then go to step (4.2);
(4.2)目标机上的检查点保存进程从命令行读入步骤(4.1)传入的参数,将包括第一目标进程的进程号pid、记录检查点范围、检查点文件context.pid描述符等参数进行初始化,并所述参数的值赋给结构体变量cr_args,格式化成检查点动态链接库libcr可识别的参数,然后转步骤(4.3);(4.2) The checkpoint saving process on the target machine reads the parameters passed in from the command line in step (4.1), which will include the process number pid of the first target process, the range of record checkpoints, the context.pid descriptor of the checkpoint file and other parameters Initialize, and assign the value of the parameter to the structure variable cr_args, format it into a parameter recognizable by the checkpoint dynamic link library libcr, and then turn to step (4.3);
(4.3)检查点动态链接库将步骤(4.2)中的参数初始化成内核可识别cri_info_t结构体形式,然后与内核通信;与此同时打开/proc文件系统中的ctrl文件获取对应检查点文件的描述符,并执行ioctl操作将检查点保存进程注册为Phase2进程,然后注册一个基于线程的回调函数Phase1,然后转步骤(4.4);(4.3) The checkpoint dynamic link library initializes the parameters in step (4.2) to the form of the cri_info_t structure recognized by the kernel, and then communicates with the kernel; at the same time, open the ctrl file in the /proc file system to obtain the description of the corresponding checkpoint file character, and execute the ioctl operation to register the checkpoint saving process as a Phase2 process, then register a thread-based callback function Phase1, and then go to step (4.4);
(4.4)检查点动态链接库向内核发送检查点保存请求,内核根据检查点保存请求中的cr_scope,构造进程关系树结构,获取需要保存检查点的应用程序对应的第一目标进程,然后唤醒Phase1回调函数,该回调函数发送参数CR_OP_HAND_CHKPT到内核,开始对第一目标进程进行检查点保存,然后转步骤(4.5);(4.4) The checkpoint dynamic link library sends a checkpoint save request to the kernel, and the kernel constructs a process relationship tree structure according to the cr_scope in the checkpoint save request, obtains the first target process corresponding to the application program that needs to save the checkpoint, and then wakes up Phase1 A callback function, which sends the parameter CR_OP_HAND_CHKPT to the kernel, starts to save the checkpoint of the first target process, and then turns to step (4.5);
(4.5)内核开始将第一目标进程的上下文信息写入检查点文件context.pid中;首先,内核保存检查点文件的文件头,然后将第一目标进程记录检查点的范围中所有进程的上下文信息保存入检查点文件,包括进程当前的状态、进程的全部用户变量和数据结构的值、当前寄存器的值、保存在进程表项中的值以及它的用户栈和内核栈中的内容;,然后转步骤(4.6);(4.5) The kernel starts to write the context information of the first target process into the checkpoint file context.pid; first, the kernel saves the file header of the checkpoint file, and then records the context of all processes in the scope of the first target process checkpoint Information is saved into the checkpoint file, including the current state of the process, the values of all user variables and data structures of the process, the value of the current register, the value stored in the process table entry, and the contents of its user stack and kernel stack; Then go to step (4.6);
(4.6)检查点保存进程通过事件循环机制轮询查看步骤(4.5)中检查点保存工作是否完成,如果完成则关闭/proc节点,让应用程序继续运行,然后转步骤(5),否则阻塞直至检查点保存工作完成;(4.6) The checkpoint saving process polls through the event loop mechanism to check whether the checkpoint saving work in step (4.5) is completed. If it is completed, close the /proc node, let the application continue to run, and then go to step (5), otherwise block until The checkpoint saving job is completed;
(5)调试应用程序步骤,如图5所示,包括下述子步骤:(5) debugging application program step, as shown in Figure 5, comprises following sub-step:
(5.1)启动目标机上的调试服务器端,参数为步骤(2.4)中应用程序的文件名;运行宿主机上的调试客户端,参数为目标机的IP地址和步骤(2.4)中获取的被调试应用程序的进程号pid,然后转步骤(5.2);(5.1) Start the debugging server on the target machine, the parameter is the file name of the application program in the step (2.4); run the debugging client on the host machine, the parameter is the IP address of the target machine and the debugged obtained in the step (2.4) The process number pid of the application, then go to step (5.2);
(5.2)调试服务器端首先创建一个线程,在线程中调用ptrace函数,调试服务器端对pid所对应的子进程进行跟踪:调用ptrace函数,其功能参数为PTRACE_ATTACH,线程号为pid,地址参数和数据参数均为0,然后进行子步骤(5.3);(5.2) The debugging server first creates a thread, calls the ptrace function in the thread, and the debugging server tracks the child process corresponding to the pid: call the ptrace function, its function parameter is PTRACE_ATTACH, the thread number is pid, address parameter and data Parameters are all 0, then carry out substep (5.3);
(5.3)调试服务器端在步骤(5.2)中创建的线程内部加载应用程序,并另外为应用程序建立符号表,加载应用程序的线程处于暂停状态,停在代码当前位置,进行子步骤(5.4);(5.3) The debugging server side loads the application program inside the thread created in step (5.2), and establishes a symbol table for the application program in addition, the thread that loads the application program is in a suspended state, stops at the current position of the code, and performs sub-step (5.4) ;
(5.4)调试客户端向调试服务器端发起远程连接请求,经调试服务器端确认后,接管被调试的进程,建立远程连接;在建立远程连接之后的整个调试过程中,调试服务器端一直处于监听状态,时刻准备接受调试客户端发送的RSP数据包。然后转步骤(5.5);(5.4) The debugging client initiates a remote connection request to the debugging server. After being confirmed by the debugging server, it takes over the debugged process and establishes a remote connection. During the entire debugging process after the remote connection is established, the debugging server is always in the monitoring state , always ready to accept the RSP packets sent by the debugging client. Then go to step (5.5);
(5.5)调试客户端即可发送各种RSP数据包对应用程序进行调试,当接收到调试人员输入的调试命令后,判断所述调试命令的命令类型是否为退出命令(quit),是则结束调试,否则进行子步骤(5.6);(5.5) The debugging client can send various RSP data packets to debug the application program. After receiving the debugging command input by the debugging personnel, it is judged whether the command type of the debugging command is a quit command (quit), and if so, it ends Debug, otherwise carry out sub-step (5.6);
(5.6)遍历调试器定义的调试命令集,查找所述调试命令的命令类型在调试命令集中是否存在,是则进行子步骤(5.7),否则向外部输出提示信息,提示调试命令输入错误,转子步骤(5.5);调试命令集除包括主流调试器拥有的调试操作外,还包括调试命令的下述命令类型:线程核绑定、插入断点、查询断点、单步执行、持续执行、执行至结束、删除断点、查看变量、查看线程运行核、获取核运行线程、统计线程运行时间;(5.6) Traverse the debug command set defined by the debugger, find out whether the command type of the debug command exists in the debug command set, if yes, perform substep (5.7), otherwise output prompt information to the outside, prompting debug command input error, rotor Step (5.5): In addition to the debugging operations owned by mainstream debuggers, the debugging command set also includes the following command types of debugging commands: thread core binding, inserting breakpoints, querying breakpoints, single-step execution, continuous execution, execution To the end, delete breakpoints, view variables, view thread running cores, get core running threads, and count thread running time;
(5.7)将所述调试命令作为数据,封装成RSP数据包,发送给目标机调试服务器端,如果在0.5秒内收到目标机调试服务器端的执行结果,则进行子步骤(5.9),否则转子步骤(5.5);(5.7) The debugging command is used as data, encapsulated into an RSP packet, and sent to the target machine debugging server end, if the execution result of the target machine debugging server end is received within 0.5 seconds, then carry out substep (5.9), otherwise the rotor step (5.5);
(5.9)调试客户端解析执行结果,获取调试结果,并该调试结果反馈给调试人员;调试人员根据反馈的调试结果判断是否已经定位应用程序中错误,是则向宿主机发出终止调试的指令,返回步骤(5.5),否则转步骤(6);(5.9) The debugging client parses the execution results, obtains the debugging results, and feeds back the debugging results to the debugging personnel; the debugging personnel judges whether the error in the application program has been located according to the feedback debugging results, and sends an instruction to the host to terminate the debugging, Return to step (5.5), otherwise go to step (6);
(6)恢复检查点步骤,如图6所示,包括下述子步骤:(6) Restoring the checkpoint step, as shown in Figure 6, includes the following sub-steps:
(6.1)根据步骤(2.4)获取的被调试应用程序的进程号pid或者用户指定的检查点文件context.pid,利用目标机执行检查点恢复进程./cr_restart context.pid,参数为要恢复的检查点文件context.pid,然后转步骤(6.2);(6.1) According to the process number pid of the debugged application obtained in step (2.4) or the checkpoint file context.pid specified by the user, use the target machine to execute the checkpoint recovery process ./cr_restart context.pid, and the parameter is the checkpoint to be restored Click the file context.pid, then go to step (6.2);
(6.2)目标机上的检查点恢复进程从命令行读取步骤(6.1)中传入的检查点文件的参数;该参数包括检查点文件的路径和恢复进程运行后要向检查点恢复进程发送的信号等,然后转步骤(6.3);(6.2) The checkpoint recovery process on the target machine reads the parameters of the checkpoint file imported in step (6.1) from the command line; this parameter includes the path of the checkpoint file and the recovery process to send to the checkpoint recovery process after running Signal etc., then go to step (6.3);
(6.3)检查点动态链接库将步骤(6.2)中检查点文件的参数初始化成内核可识别cri_info_t结构体形式,然后与内核取得通信;与此同时,打开/proc文件系统中的ctrl文件,获取对应文件描述符,对其执行ioctl操作将检查点恢复进程注册为Phase2进程,然后为第一目标进程的检查点恢复进程注册一个基于线程的回调函数Phase1,然后转步骤(6.4);(6.3) The checkpoint dynamic link library initializes the parameters of the checkpoint file in step (6.2) into the cri_info_t structure form that the kernel can recognize, and then communicates with the kernel; at the same time, open the ctrl file in the /proc file system to obtain Corresponding to the file descriptor, perform ioctl operation on it to register the checkpoint recovery process as a Phase2 process, then register a thread-based callback function Phase1 for the checkpoint recovery process of the first target process, and then turn to step (6.4);
(6.4)检查点动态链接库向内核发送检查点恢复请求,内核读取检查点恢复请求中的结构体cr_rstrt_args数据,并调用函数分配并初始化检查点恢复请求的变量req,然后获取检查点文件的路径,并从检查点文件中读取上下文信息,并判断检查点服务器端的版本,第一目标进程所处的体系结构和内核版本是否和该检查点系统中对应的上下文信息保持一致,如果不一致就直接结束,否则转步骤(6.5);(6.4) The checkpoint dynamic link library sends a checkpoint recovery request to the kernel, and the kernel reads the structure cr_rstrt_args data in the checkpoint recovery request, and calls the function to allocate and initialize the variable req of the checkpoint recovery request, and then obtains the checkpoint file Path, and read the context information from the checkpoint file, and judge the version of the checkpoint server, whether the architecture and kernel version of the first target process are consistent with the corresponding context information in the checkpoint system, if not, then End directly, otherwise go to step (6.5);
(6.5)内核从检查点文件context.pid中读取上下文信息,然后将进程头从内核写入用户层,然后对于确定存在于检查点文件中等待恢复的进程,检查点恢复进程作为父进程调用fork()创建子进程,子进程开始检查点恢复操作,调用clone()系统调用,创建第二目标进程,子进程调用ioctl()函数与内核取得通信,发送参数CR_OP_RSTRT_CHILD到内核层,内核层在第二目标进程内恢复第一目标进程对应的检查点文件中所有进程信息的内容,然后转步骤(5.6);(6.5) The kernel reads the context information from the checkpoint file context.pid, then writes the process header from the kernel to the user layer, and then calls the checkpoint recovery process as the parent process for the process that is determined to exist in the checkpoint file and waits for recovery fork() creates a child process, the child process starts the checkpoint recovery operation, calls the clone() system call, creates a second target process, the child process calls the ioctl() function to communicate with the kernel, and sends the parameter CR_OP_RSTRT_CHILD to the kernel layer, and the kernel layer is Restore the content of all process information in the checkpoint file corresponding to the first target process in the second target process, then go to step (5.6);
(6.6)检查点恢复进程通过事件循环机制,等待执行检查点恢复操作的检查点恢复进程的子进程完成检查点恢复操作,当第二目标进程完成检查点恢复工作后,检查点恢复进程进行相关的清理工作,释放检查点恢复进程过程中的一些相关数据结构,然后令第一目标进程为第二目标进程,转步骤(5.1),而不必从头执行应用程序,从而缩短了调试时的等待时间。(6.6) The checkpoint recovery process waits for the child process of the checkpoint recovery process to complete the checkpoint recovery operation through the event loop mechanism. When the second target process completes the checkpoint recovery work, the checkpoint recovery process performs related Cleanup work, release some relevant data structures in the process of checkpoint recovery, then make the first target process the second target process, go to step (5.1), without having to execute the application program from scratch, thereby shortening the waiting time during debugging .
实施例2Example 2
实施例2的测试环境同实施例1The test environment of embodiment 2 is the same as embodiment 1
如图2所示,本实施例为对被调试应用程序sigtest1.c的一次调试过程,主要包括建立远程连接、运行应用程序、设置检查点、调试应用程序、恢复检查点等步骤,具体如下:As shown in Figure 2, this embodiment is a debugging process to the debugged application program sigtest1.c, which mainly includes steps such as establishing a remote connection, running the application program, setting a checkpoint, debugging the application program, and restoring the checkpoint, as follows:
(1)建立远程连接,包括下述子步骤:(1) establish a remote connection, including the following sub-steps:
(1.1)通过宿主机命令行输入ssh命令与目标机建立远程连接,命令的参数为目标机的用户名以及IP地址,然后转步骤(1.2);(1.1) Enter the ssh command to establish a remote connection with the target machine through the command line of the host machine. The parameters of the command are the user name and IP address of the target machine, and then go to step (1.2);
(1.2)调试人员在宿主机上输入目标机的登录密码,使得宿主机与目标机完成建立远程连接,然后转步骤(2);(1.2) The debugger enters the login password of the target machine on the host machine, so that the host machine and the target machine complete the establishment of a remote connection, and then go to step (2);
(2)运行目标应用程序以及并发应用程序,包括下述子步骤:(2) Run the target application program and the concurrent application program, including the following sub-steps:
(2.1)判断目标机上是否已经加载检查点内核模块epcr_imports.ko和epcr.ko,如果已经加载就直接转步骤(2.2),如果没有就利用目标机命令行执行加载检查点内核模块脚本./sh epcr_module.sh,将检查点内核模块加载到内核,然后转步骤(2.2);(2.1) Determine whether the checkpoint kernel modules epcr_imports.ko and epcr.ko have been loaded on the target machine. If they have been loaded, go to step (2.2). If not, use the command line of the target machine to execute the load checkpoint kernel module script./sh epcr_module.sh, load the checkpoint kernel module into the kernel, and then go to step (2.2);
(2.2)判断目标机上检查点的辅助服务器server_for_checkpoint是否运行,如果已经运行就直接转步骤(2.3),否则就利用目标机命令行终端执行命令./server_for_checkpoint启动辅助服务器,然后转步骤(2.3);(2.2) Determine whether the auxiliary server server_for_checkpoint of the checkpoint on the target machine is running, if it has been running, it will directly go to step (2.3), otherwise it will use the command line terminal of the target machine to execute the command ./server_for_checkpoint to start the auxiliary server, and then go to step (2.3);
(2.3)利用目标机命令行运行mapcreate程序,创建一个文件,用来保存需要进行检查点操作的进程号;(2.3) Use the command line of the target machine to run the mapcreate program to create a file to save the process number that needs to be checked;
(2.4)利用目标机命令行执行目标应用程序可执行文件./sigtest1,启动目标应用程序,获得目标应用程序对应的第一目标进程,随后同样利用目标机命令执行并发应用程序可执行文件./sigtest2 80,启动并发应用程序,并获得并发应用程序对应的并发进程,此时第一目标进程和并发进程之间并发运行;并发应用程序可执行文件中的80为并发进程向第一目标进程发送的信号,此时运行中的第一目标进程接收此信号;由于目标应用程序和并发应用程序皆与libsigqueue.so动态链接库相链接;此时,该动态链接库重写了sigqueue函数,并发进程调用sigqueue函数发送信号,在运行并发应用程序时,该函数将并发进程以及第一目标进程对应的进程号,以结构体的形式保存到步骤(2.3)中创建的文件中,然后转步骤(2.5);(2.4) Use the target machine command line to execute the target application executable file ./sigtest1, start the target application program, obtain the first target process corresponding to the target application program, and then use the target machine command to execute the concurrent application program executable file./ sigtest2 80, start the concurrent application program, and obtain the concurrent process corresponding to the concurrent application program, at this time, the first target process and the concurrent process run concurrently; 80 in the concurrent application executable file is the concurrent process sending to the first target process signal, the first target process running at this time receives this signal; since both the target application program and the concurrent application program are linked with the libsigqueue.so dynamic link library; at this time, the dynamic link library rewrites the sigqueue function, and the concurrent process Call the sigqueue function to send a signal. When running a concurrent application, this function saves the concurrent process and the process number corresponding to the first target process in the form of a structure in the file created in step (2.3), and then turns to step (2.5 );
(2.5)启动宿主机上的检查点客户端./client_for_checkpoint,连接到目标机上检查点服务器端server_for_checkpoint,发送步骤(2.4)执行的目标应用程序的文件名sigtest1到检查点服务器端,由检查点服务器端查找目标机上第一目标进程的对应的第一进程号,然后将该进程号发送给检查点客户端client_for_checkpoint,然后转步骤(3);(2.5) Start the checkpoint client ./client_for_checkpoint on the host machine, connect to the checkpoint server server_for_checkpoint on the target machine, send the file name sigtest1 of the target application program executed in step (2.4) to the checkpoint server, and the checkpoint server The terminal searches for the corresponding first process number of the first target process on the target machine, then sends the process number to the checkpoint client client_for_checkpoint, and then turns to step (3);
(3)目标机根据调试人员输入的命令判断是否需要设置检查点;当调试人员需要设置检查点时,则进入下一步,否则进入步骤(5);(3) The target machine judges whether a checkpoint needs to be set according to the command input by the debugger; when the debugger needs to set a checkpoint, then enter the next step, otherwise enter step (5);
(4)设置检查点,包括下述子步骤:(4) Checkpoint is set, including the following sub-steps:
(4.1)宿主机向目标机输入检查点命令./checkpoint pid–backup,创建检查点保存进程,所述检查点保存进程的参数为步骤(2.5)获取的第一进程号;同时,通过遍历步骤(2.3)创建的文件中在步骤(2.4)保存的结构体得到并发进程对应的第二进程号,然后转步骤(4.2);(4.1) The host machine inputs the checkpoint command ./checkpoint pid–backup to the target machine to create a checkpoint preservation process whose parameter is the first process number obtained in step (2.5); meanwhile, by traversing the steps (2.3) In the file created, the structure saved in step (2.4) obtains the second process number corresponding to the concurrent process, and then turns to step (4.2);
(4.2)目标机上的检查点保存进程从命令行读入步骤(4.1)传入的参数,将包括第一目标进程以及并发进程的参数进行初始化,并所述参数的值赋给结构体变,格式化成检查点动态链接库libcr可识别的参数,然后转步骤(4.3);(4.2) The checkpoint saving process on the target machine reads the parameters imported from the command line into step (4.1), initializes the parameters including the first target process and concurrent processes, and assigns the value of the parameters to the structure variable, Format it into parameters recognizable by the checkpoint dynamic link library libcr, and then turn to step (4.3);
(4.3)检查点动态链接库将步骤(4.2)中的参数分别初始化成内核可识别cri_info_t结构体形式,然后与内核通信;与此同时打开/proc文件系统中的ctrl文件获取对应检查点文件的描述符,并执行ioctl操作将检查点保存进程注册为Phase2进程,然后分别注册两个基于线程的回调函数Phase1,然后转步骤(4.4);(4.3) The checkpoint dynamic link library initializes the parameters in step (4.2) into the form of the cri_info_t structure recognized by the kernel, and then communicates with the kernel; at the same time, open the ctrl file in the /proc file system to obtain the corresponding checkpoint file descriptor, and execute the ioctl operation to register the checkpoint saving process as a Phase2 process, then register two thread-based callback functions Phase1, and then go to step (4.4);
(4.4)检查点动态链接库向内核发送检查点保存请求,内核根据检查点保存请求中的cr_scope,构造进程关系树结构,获取需要保存检查点的应用程序对应的第一目标进程和并发进程,然后唤醒Phase1回调函数,该回调函数发送参数CR_OP_HAND_CHKPT到内核,开始对第一目标进程以及并发进程进行检查点保存,然后转步骤(4.5);(4.4) The checkpoint dynamic link library sends a checkpoint storage request to the kernel, and the kernel constructs a process relationship tree structure according to the cr_scope in the checkpoint storage request, and obtains the corresponding first target process and concurrent process of the application program that needs to save the checkpoint, Then wake up the Phase1 callback function, which sends the parameter CR_OP_HAND_CHKPT to the kernel, starts to save the checkpoint of the first target process and the concurrent process, and then turns to step (4.5);
(4.5)内核开始将第一目标进程以及并发进程的上下文信息分别写入检查点文件context.pid中;首先,内核保存检查点文件的文件头,然后将第一目标进程以及并发进程的上下文信息保存入检查点文件,包括进程当前的状态、进程的全部用户变量和数据结构的值、当前寄存器的值、保存在进程表项中的值以及它的用户栈和内核栈中的内容;,然后转步骤(4.6);(4.5) The kernel starts to write the context information of the first target process and the concurrent process into the checkpoint file context.pid respectively; first, the kernel saves the file header of the checkpoint file, and then writes the context information of the first target process and the concurrent process Save into the checkpoint file, including the current state of the process, the value of all user variables and data structures of the process, the value of the current register, the value saved in the process table entry, and the contents of its user stack and kernel stack; and then Go to step (4.6);
(4.6)检查点保存进程通过事件循环机制轮询查看步骤(4.5)中检查点保存工作是否完成,如果完成则关闭/proc节点,让目标应用程序以及并发程序继续运行,然后转步骤(5),否则阻塞直至检查点保存工作完成;(4.6) The checkpoint saving process polls through the event loop mechanism to check whether the checkpoint saving work in step (4.5) is completed. If it is completed, close the /proc node, let the target application and concurrent programs continue to run, and then go to step (5) , otherwise block until the checkpoint saving work is completed;
(5)调试应用程序步骤,如图5所示,包括下述子步骤:(5) debugging application program step, as shown in Figure 5, comprises following sub-step:
(5.1)启动目标机上的调试服务器端,参数为步骤(2.5)中目标应用程序的文件名;运行宿主机上的调试客户端,参数为目标机的IP地址和步骤(2.5)中获取的目标应用程序的进程号pid,然后转步骤(5.2);(5.1) Start the debugging server on the target machine, the parameter is the file name of the target application program in the step (2.5); run the debugging client on the host machine, the parameter is the IP address of the target machine and the target obtained in the step (2.5) The process number pid of the application, then go to step (5.2);
(5.2)调试服务器端首先创建一个线程,在线程中调用ptrace函数,调试服务器端对pid所对应的子进程进行跟踪:调用ptrace函数,其功能参数为PTRACE_ATTACH,线程号为pid,地址参数和数据参数均为0,然后进行子步骤(5.3);(5.2) The debugging server first creates a thread, calls the ptrace function in the thread, and the debugging server tracks the child process corresponding to the pid: call the ptrace function, its function parameter is PTRACE_ATTACH, the thread number is pid, address parameter and data Parameters are all 0, then carry out substep (5.3);
(5.3)调试服务器端在步骤(5.2)中创建的线程内部加载目标应用程序,并另外为目标应用程序建立符号表,加载目标应用程序的线程处于暂停状态,停在代码当前位置,进行子步骤(5.4);(5.3) The debugging server loads the target application program inside the thread created in step (5.2), and additionally establishes a symbol table for the target application program, the thread loading the target application program is in a suspended state, stops at the current position of the code, and performs sub-steps (5.4);
(5.4)调试客户端向调试服务器端发起远程连接请求,经调试服务器端确认后,接管被调试的进程,建立远程连接;在建立远程连接之后的整个调试过程中,调试服务器端一直处于监听状态,时刻准备接受调试客户端发送的RSP数据包。然后转步骤(5.5);(5.4) The debugging client initiates a remote connection request to the debugging server. After being confirmed by the debugging server, it takes over the debugged process and establishes a remote connection. During the entire debugging process after the remote connection is established, the debugging server is always in the monitoring state , always ready to accept the RSP packets sent by the debugging client. Then go to step (5.5);
(5.5)调试客户端即可发送各种RSP数据包对目标应用程序进行调试,当接收到调试人员输入的调试命令后,判断所述调试命令的命令类型是否为退出命令(quit),是则结束调试,否则进行子步骤(5.6);(5.5) The debug client can send various RSP data packets to debug the target application program. After receiving the debug command input by the debugger, judge whether the command type of the debug command is an exit command (quit), if so End debugging, otherwise carry out sub-step (5.6);
(5.6)遍历调试器定义的调试命令集,查找所述调试命令的命令类型在调试命令集中是否存在,是则进行子步骤(5.7),否则向外部输出提示信息,提示调试命令输入错误,转子步骤(5.5);调试命令集除包括主流调试器拥有的调试操作外,还包括调试命令的下述命令类型:线程核绑定、插入断点、查询断点、单步执行、持续执行、执行至结束、删除断点、查看变量、查看线程运行核、获取核运行线程、统计线程运行时间;(5.6) Traverse the debug command set defined by the debugger, find out whether the command type of the debug command exists in the debug command set, if yes, perform substep (5.7), otherwise output prompt information to the outside, prompting debug command input error, rotor Step (5.5): In addition to the debugging operations owned by mainstream debuggers, the debugging command set also includes the following command types of debugging commands: thread core binding, inserting breakpoints, querying breakpoints, single-step execution, continuous execution, execution To the end, delete breakpoints, view variables, view thread running cores, get core running threads, and count thread running time;
(5.7)将所述调试命令作为数据,封装成RSP数据包,发送给目标机调试服务器端,如果在0.5秒内收到目标机调试服务器端的执行结果,则进行子步骤(5.9),否则转子步骤(5.5);(5.7) The debugging command is used as data, encapsulated into an RSP packet, and sent to the target machine debugging server end, if the execution result of the target machine debugging server end is received within 0.5 seconds, then carry out substep (5.9), otherwise the rotor step (5.5);
(5.9)调试客户端解析执行结果,获取调试结果,并该调试结果反馈给调试人员;调试人员根据反馈的调试结果判断是否已经定位应用程序中错误,是则向宿主机发出终止调试的指令,返回步骤(5.5),否则转步骤(6);(5.9) The debugging client parses the execution results, obtains the debugging results, and feeds back the debugging results to the debugging personnel; the debugging personnel judges whether the error in the application program has been located according to the feedback debugging results, and sends an instruction to the host to terminate the debugging, Return to step (5.5), otherwise go to step (6);
(6)恢复检查点步骤,如图6所示,包括下述子步骤:(6) Restoring the checkpoint step, as shown in Figure 6, includes the following sub-steps:
(6.1)根据步骤(2.4)获取的第一进程号或者步骤(4.3)中的检查点文件context.pid,利用目标机执行检查点恢复进程./restart context.pid,参数为要恢复的检查点文件context.pid,然后转步骤(6.2);(6.1) According to the first process number obtained in step (2.4) or the checkpoint file context.pid in step (4.3), use the target machine to execute the checkpoint recovery process./restart context.pid, the parameter is the checkpoint to be restored File context.pid, then go to step (6.2);
(6.2)目标机上的检查点恢复进程从命令行读取步骤(6.1)中传入的检查点文件的参数;该参数包括检查点文件的路径和恢复进程运行后要向检查点恢复进程发送的信号等,然后转步骤(6.3);(6.2) The checkpoint recovery process on the target machine reads the parameters of the checkpoint file imported in step (6.1) from the command line; this parameter includes the path of the checkpoint file and the recovery process to send to the checkpoint recovery process after running Signal etc., then go to step (6.3);
(6.3)检查点动态链接库将步骤(6.2)中检查点文件的参数初始化成内核可识别cri_info_t结构体形式,然后与内核取得通信;与此同时,打开/proc文件系统中的ctrl文件,获取对应文件描述符,对其执行ioctl操作将检查点恢复进程注册为Phase2进程,然后为第一目标进程以及并发进程的检查点恢复进程分别注册基于线程的回调函数,然后转步骤(6.4);(6.3) The checkpoint dynamic link library initializes the parameters of the checkpoint file in step (6.2) into the cri_info_t structure form that the kernel can recognize, and then communicates with the kernel; at the same time, open the ctrl file in the /proc file system to obtain Corresponding to the file descriptor, perform an ioctl operation on it to register the checkpoint recovery process as a Phase2 process, then register a thread-based callback function for the first target process and the checkpoint recovery process of the concurrent process, and then turn to step (6.4);
(6.4)检查点动态链接库向内核发送检查点恢复请求,内核读取检查点恢复请求中的结构体cr_rstrt_args数据,并调用函数分配并初始化检查点恢复请求的变量req,然后获取检查点文件的路径,并从检查点文件中读取上下文信息,并判断检查点服务器端的版本,第一目标进程以及并发进程所处的体系结构和内核版本是否和该检查点系统中对应的上下文信息保持一致,如果不一致就直接结束,否则转步骤(6.5);(6.4) The checkpoint dynamic link library sends a checkpoint recovery request to the kernel, and the kernel reads the structure cr_rstrt_args data in the checkpoint recovery request, and calls the function to allocate and initialize the variable req of the checkpoint recovery request, and then obtains the checkpoint file Path, and read the context information from the checkpoint file, and determine whether the version of the checkpoint server, the architecture and kernel version of the first target process and concurrent processes are consistent with the corresponding context information in the checkpoint system, If inconsistent, end directly, otherwise go to step (6.5);
(6.5)内核从检查点文件context.pid中读取上下文信息,然后将第一目标进程以及并发进程进程头从内核写入用户层,然后对于确定存在于检查点文件中等待恢复的进程,检查点恢复进程作为父进程调用fork()创建子进程,子进程开始检查点恢复操作,调用clone()系统调用,创建第二目标进程以及第三目标进程,子进程调用ioctl()函数与内核取得通信,发送参数CR_OP_RSTRT_CHILD到内核层,内核层分别在第二目标进程以及第三目标进程内恢复第一目标进程以及并发进程对应的检查点文件中所有进程信息的内容,然后转步骤(5.6);(6.5) The kernel reads the context information from the checkpoint file context.pid, then writes the first target process and the concurrent process process header from the kernel to the user layer, and then checks for the process that is determined to exist in the checkpoint file and waits for recovery Point recovery process as the parent process calls fork() to create a child process, the child process starts the checkpoint recovery operation, calls the clone() system call, creates the second target process and the third target process, the child process calls the ioctl() function and the kernel obtains Communication, sending parameter CR_OP_RSTRT_CHILD to the kernel layer, the kernel layer recovers the content of all process information in the checkpoint file corresponding to the first target process and the concurrent process in the second target process and the third target process respectively, and then turns to step (5.6);
(6.6)检查点恢复进程通过事件循环机制,等待执行检查点恢复操作的检查点恢复进程的子进程完成检查点恢复操作,当第二目标进程完成检查点恢复工作后,检查点恢复进程进行相关的清理工作,释放检查点恢复进程过程中的一些相关数据结构,然后令第一目标进程为第二目标进程,并发进程为第三目标进程,转步骤(5.1),而不必从头执行应用程序,从而缩短了调试时的等待时间。(6.6) The checkpoint recovery process waits for the child process of the checkpoint recovery process to complete the checkpoint recovery operation through the event loop mechanism. When the second target process completes the checkpoint recovery work, the checkpoint recovery process performs related Cleanup work, release some relevant data structures in the checkpoint restoration process, then make the first target process the second target process, and the concurrent process as the third target process, turn to step (5.1), without having to execute the application program from scratch, This shortens the waiting time during commissioning.
当并发进程启动,并给第一目标进程发送信号时,检查点文件会记录并发进程发送信号的状态;使得本实施例对进程进行检查点保存操作时,第一目标进程以及所有参与并发运行的并发进程都保持了全局一致性状态,使得检查点文件记录的与并发相关的状态是同步的;并且在进行检查点的恢复操作时,恢复所有并发进程,以保持全局一致性状态,从而实现了多进程协同检查点操作。When the concurrent process starts and sends a signal to the first target process, the checkpoint file will record the status of the signal sent by the concurrent process; so that when this embodiment performs a checkpoint save operation on the process, the first target process and all participating concurrent operations Concurrent processes maintain a globally consistent state, so that the concurrency-related state recorded in the checkpoint file is synchronized; and when the checkpoint recovery operation is performed, all concurrent processes are restored to maintain a globally consistent state, thereby achieving Multi-process cooperative checkpoint operation.
本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。It is easy for those skilled in the art to understand that the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, All should be included within the protection scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610595940.9A CN106201896A (en) | 2016-07-26 | 2016-07-26 | Adjustment method based on checkpoint, system and device under a kind of embedded environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610595940.9A CN106201896A (en) | 2016-07-26 | 2016-07-26 | Adjustment method based on checkpoint, system and device under a kind of embedded environment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106201896A true CN106201896A (en) | 2016-12-07 |
Family
ID=57496724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610595940.9A Pending CN106201896A (en) | 2016-07-26 | 2016-07-26 | Adjustment method based on checkpoint, system and device under a kind of embedded environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201896A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111124488A (en) * | 2019-12-11 | 2020-05-08 | 山东超越数控电子股份有限公司 | Debian system transplanting method based on Loongson processor |
CN111813578A (en) * | 2020-07-13 | 2020-10-23 | 艾普阳科技(深圳)有限公司 | Method and assembly for debugging 64-bit application program by 32-bit IDE (integrated development environment), and debugging system |
CN112035346A (en) * | 2020-08-25 | 2020-12-04 | 华东计算技术研究所(中国电子科技集团公司第三十二研究所) | Automatic testing method, system and medium based on embedded DSP operating system |
CN112073356A (en) * | 2019-06-10 | 2020-12-11 | 海信视像科技股份有限公司 | Data transmission method and display device |
WO2021047585A1 (en) * | 2019-09-12 | 2021-03-18 | 安徽寒武纪信息科技有限公司 | Program debugging method, apparatus, debugging tool and computer device |
CN112711527A (en) * | 2020-12-16 | 2021-04-27 | 北京科银京成技术有限公司 | Debugging method and device of real-time process, target machine and storage medium |
CN112925700A (en) * | 2019-12-06 | 2021-06-08 | 西安诺瓦星云科技股份有限公司 | Program debugging method, device and system and embedded equipment |
CN114253837A (en) * | 2021-11-22 | 2022-03-29 | 杭州加速科技有限公司 | Multithreading debugging method and system for ATE (automatic test equipment) tester program and tester table |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1490724A (en) * | 2002-10-18 | 2004-04-21 | 上海贝尔有限公司 | Virtual machine for embedded systemic software development |
US6983460B1 (en) * | 1999-11-17 | 2006-01-03 | Cp8 Technologies | Method for loading applications into a multiapplication embedded system equipped with data processing resources, corresponding embedded system and execution method |
US7020872B1 (en) * | 1999-07-01 | 2006-03-28 | Cp8 Technologies | Method for verifying code transformers for an incorporated system, in particular in a chip card |
CN102129408A (en) * | 2011-04-14 | 2011-07-20 | 电子科技大学 | Record playback technology-based embedded software debugging device and method |
CN102270121A (en) * | 2010-06-07 | 2011-12-07 | 上海为舟网络科技有限公司 | Software development of virtual embedded system in rich Internet deployment system |
CN103729288A (en) * | 2013-11-01 | 2014-04-16 | 华中科技大学 | Application program debugging method under embedded multi-core environment |
CN105224454A (en) * | 2015-09-25 | 2016-01-06 | 华为技术有限公司 | A kind of adjustment method, polycaryon processor and commissioning device |
-
2016
- 2016-07-26 CN CN201610595940.9A patent/CN106201896A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7020872B1 (en) * | 1999-07-01 | 2006-03-28 | Cp8 Technologies | Method for verifying code transformers for an incorporated system, in particular in a chip card |
US6983460B1 (en) * | 1999-11-17 | 2006-01-03 | Cp8 Technologies | Method for loading applications into a multiapplication embedded system equipped with data processing resources, corresponding embedded system and execution method |
CN1490724A (en) * | 2002-10-18 | 2004-04-21 | 上海贝尔有限公司 | Virtual machine for embedded systemic software development |
CN102270121A (en) * | 2010-06-07 | 2011-12-07 | 上海为舟网络科技有限公司 | Software development of virtual embedded system in rich Internet deployment system |
CN102129408A (en) * | 2011-04-14 | 2011-07-20 | 电子科技大学 | Record playback technology-based embedded software debugging device and method |
CN103729288A (en) * | 2013-11-01 | 2014-04-16 | 华中科技大学 | Application program debugging method under embedded multi-core environment |
CN105224454A (en) * | 2015-09-25 | 2016-01-06 | 华为技术有限公司 | A kind of adjustment method, polycaryon processor and commissioning device |
Non-Patent Citations (1)
Title |
---|
郑渤龙: "基于嵌入式多核环境的检查点系统研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112073356A (en) * | 2019-06-10 | 2020-12-11 | 海信视像科技股份有限公司 | Data transmission method and display device |
CN112073356B (en) * | 2019-06-10 | 2022-07-19 | 海信视像科技股份有限公司 | Data transmission method and display device |
WO2021047585A1 (en) * | 2019-09-12 | 2021-03-18 | 安徽寒武纪信息科技有限公司 | Program debugging method, apparatus, debugging tool and computer device |
CN112925700A (en) * | 2019-12-06 | 2021-06-08 | 西安诺瓦星云科技股份有限公司 | Program debugging method, device and system and embedded equipment |
CN112925700B (en) * | 2019-12-06 | 2024-05-10 | 西安诺瓦星云科技股份有限公司 | Program debugging method, device, system and embedded device |
CN111124488A (en) * | 2019-12-11 | 2020-05-08 | 山东超越数控电子股份有限公司 | Debian system transplanting method based on Loongson processor |
CN111813578A (en) * | 2020-07-13 | 2020-10-23 | 艾普阳科技(深圳)有限公司 | Method and assembly for debugging 64-bit application program by 32-bit IDE (integrated development environment), and debugging system |
CN112035346A (en) * | 2020-08-25 | 2020-12-04 | 华东计算技术研究所(中国电子科技集团公司第三十二研究所) | Automatic testing method, system and medium based on embedded DSP operating system |
CN112711527A (en) * | 2020-12-16 | 2021-04-27 | 北京科银京成技术有限公司 | Debugging method and device of real-time process, target machine and storage medium |
CN112711527B (en) * | 2020-12-16 | 2024-02-06 | 北京科银京成技术有限公司 | Debugging method and device for real-time process, target machine and storage medium |
CN114253837A (en) * | 2021-11-22 | 2022-03-29 | 杭州加速科技有限公司 | Multithreading debugging method and system for ATE (automatic test equipment) tester program and tester table |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106201896A (en) | Adjustment method based on checkpoint, system and device under a kind of embedded environment | |
CN103729288B (en) | The adjustment method of application program under a kind of embedded multi-core environment | |
US11080166B2 (en) | Database trace debugger | |
CN104281520B (en) | Tracking and method, the apparatus and system of debugging | |
US8572577B2 (en) | Monitoring changes to data within a critical section of a threaded program | |
KR102119585B1 (en) | Debugging method, multi-core processor, and debugging device | |
US8589881B2 (en) | Web-based software debugging apparatus and method for remote debugging | |
CN107368313B (en) | Code detection method, device and electronic equipment | |
EP2972881B1 (en) | Diagnostics of state transitions | |
US20120036501A1 (en) | Method and System for Capturing System and User Events Using Hardware Trace Devices | |
CN114546736A (en) | Automatic serial port testing method | |
CN113704097A (en) | Method and apparatus for data flow analysis using compiler type information in processor trace logs | |
CN102594618A (en) | Method and device for realizing storage device test of storage area network (SAN) | |
CN105740139A (en) | Virtual environment based embedded software debugging method | |
CN109002398A (en) | A kind of Auto-matching formula server software test terminal | |
CN110704314A (en) | Fault injection method for embedded software test | |
US20110061042A1 (en) | Synchronized java debugger | |
CN105630664B (en) | Reverse debugging method and device and debugger | |
CN109032874A (en) | A kind of memory pressure test method, device, terminal and storage medium | |
US8458669B2 (en) | Automated test system | |
US20140245076A1 (en) | System and method for preserving critical debug data in a portable computing device | |
CN115543858A (en) | Method and device for debugging code file and nonvolatile storage medium | |
CN116662134A (en) | Linux kernel performance tracking tool based on eBPF | |
CN118535402A (en) | Memory test method, device, test equipment and system | |
CN112241359B (en) | Equipment testing method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161207 |
|
WD01 | Invention patent application deemed withdrawn after publication |