Providing for multi-process log debug without running on a production environment
AssigneeInternational Business Machines Corporation
InventorsXiao Ling Chen, Qi Ye, Wen Ji Huang, Heng Wang, Kui Zhang
Life of this patent
Estimating the term…
Abstract
Methods, computer program products, and/or systems are provided that perform the following operations: determining that a log multi-process debug mode is specified; obtaining a log file for debugging a source code, wherein the log file includes a plurality of log records; inserting a plurality of process identifier fields into each current log record in the log file; inserting a new log record into the log file for a created new process; and providing for performance of debugging for the source code based in part on the plurality of process identifier fields inserted into each current log record.
Claims18
A computer-implemented method comprising:
- determining that a log multi-process debug mode is specified;
- obtaining a log file for debugging a source code, wherein the log file includes a plurality of log records including respectively corresponding process identifiers populating a plurality of process identifier fields;
- processing the log file by inserting a new log record with a new process identifier into the log file for a created new process;
- providing for performance of debugging for the source code based in part on the plurality of process identifier fields;
- and
- switching to a different inferior process while debugging the source code by:
- obtaining a target process identifier of the different inferior process;
- determining whether the target process identifier is located in a process family tree for the new log record;
- in response to determining the target process identifier is located in the process family tree for the new log record, obtaining a child process identifier of the different inferior process;
- identifying a located log record included in the log file, the located log record having the new process identifier equal to the child process identifier for the different inferior process;
- and
- updating a debugger current program counter and a debugger current process identifier based on the located log record.
A computer program product comprising a computer readable storage medium having stored thereon:
- program instructions programmed to determine that a loci multi-process debug mode is specified;
- program instructions programmed to obtain a log file for debugging a source code, wherein the log file includes a plurality of log records including respectively corresponding process identifiers populating a plurality of process identifier fields;
- program instructions programmed to process the log file by inserting insert a new log record with a new process identifier into the log file for a created new process;
- program instructions programmed to provide for performance of debugging for the source code based in part on the plurality of process identifier fields;
- and
- program instructions programmed to switch to a different inferior process while debugging the source code by:
- obtaining a target process identifier of the different inferior process;
- determining whether the target process identifier is located in a process family tree for the new log record;
- in response to determining the target process identifier is located in the process family tree for the new log record, obtaining a child process identifier of the different inferior process;
- identifying a located log record included in the log file, the located log record having the new process identifier equal to the child process identifier for the different inferior process;
- and
- updating a debugger current program counter and a debugger current process identifier based on the located log record.
A computer system comprising:
- a processor set;
- and
- a computer readable storage medium;
- wherein:
- the processor set is structured, located, connected and programmed to run program instructions stored on the computer readable storage medium;
- and
- the stored program instructions include:
- program instructions programmed to determine that a log multi-process debug mode is specified;
- program instructions programmed to obtain a log file for debugging a source code, wherein the log file includes a plurality of log records including respectively corresponding process identifiers populating a plurality of process identifier fields;
- program instructions programmed to process the log file by inserting a new log record with a new process identifier into the log file for a created new process;
- program instructions programmed to provide for performance of debugging for the source code based in part on the plurality of process identifier fields;
- and
- program instructions programmed to switch to a different inferior process while debugging the source code by:
- obtaining a target process identifier of the different inferior process;
- determining whether the target process identifier is located in a process family tree for the new log record;
- in response to determining the target process identifier is located in the process family tree for the new log record, obtaining a child process identifier of the different inferior process;
- identifying a located log record included in the log file, the located log record having the new process identifier equal to the child process identifier for the different inferior process;
- and
- updating a debugger current program counter and a debugger current process identifier based on the located log record.
Dependencies are inferred from the claim text.