Computer-implemented method and system for automatically invoking a predetermined debugger command at a desired location of a single thread of a program
First Claim
1. A computer-implemented method for automatically invoking at least one predetermined debugger command at a desired location of a single thread of a program containing at least one thread for debugging said single thread at the desired location, said method comprising:
- (a) embedding within said single thread at said desired location thereof a utility that is configured for creating a trace file if the trace file does not exist;
(b) running the program during a first pass so as to create the trace file and write a traced value of a specified variable at the location in the program where the utility is embedded; and
(c) running the program during a second pass so that on reaching said desired location, the utility is invoked for reading said trace file and invoking said at least one predetermined debugger command that has been previously embedded in the trace file in place of the traced value of said variable.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer-implemented method and system for automatically invoking a predetermined debugger command at a desired location of a single thread of a program containing at least one thread. At the desired location of the program thread, there is embedded a utility which reads a trace file in which the predetermined debugger command has been previously embedded. Upon re-running the program, the trace file is read and upon reaching the predetermined debugger command, the debugger attaches itself to the running process and executes the process from its current program counter. The debugger is invoked only if there is a discrepancy between successive runs of the program.
-
Citations
42 Claims
-
1. A computer-implemented method for automatically invoking at least one predetermined debugger command at a desired location of a single thread of a program containing at least one thread for debugging said single thread at the desired location, said method comprising:
-
(a) embedding within said single thread at said desired location thereof a utility that is configured for creating a trace file if the trace file does not exist;
(b) running the program during a first pass so as to create the trace file and write a traced value of a specified variable at the location in the program where the utility is embedded; and
(c) running the program during a second pass so that on reaching said desired location, the utility is invoked for reading said trace file and invoking said at least one predetermined debugger command that has been previously embedded in the trace file in place of the traced value of said variable. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer-implemented method for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said’
- method comprising;
(a) embedding within the specific thread of the program at said desired location thereof a utility which;
i) creates a trace file if it does not exist;
ii) if a compare flag is set to a first value, writes a traced value of at least one variable thereto at a desired location of the program; and
iii) if the compare flag is set to a second value compares a current value of the least one variable with a respective line in the trace file and if they are different invokes a debugger so as to execute a debugger command embedded in the trace file in place of the traced value; and
(b) running the program so that on reaching said desired location, the utility is invoked for reading a modified trace file readable by the program wherein at least one traced value is replaced or augmented by said debugger command. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
- method comprising;
-
18. A computer program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform a method for automatically invoking at least one predetermined debugger command at a desired location of a single thread of a program containing at least one thread for debugging said single thread at the desired location, said method comprising:
-
(a) embedding within said program thread at said desired location thereof a utility that is configured for creating a trace file if the trace file does not exist;
(b) running the program during a first pass so as to create the trace file and write a traced value of a specified variable at the location in the program where the utility is embedded; and
(c) running the program during a second pass so that on reaching said desired location, the utility is invoked for reading said trace file and invoking at least one predetermined debugger command that has been previously embedded in the trace file in place of the traced value of said variable.
-
-
19. A computer program product comprising a computer useable medium having computer readable program code embodied therein for automatically invoking at least one predetermined debugger command at a desired location of a single thread of a program containing at least one thread for debugging said single thread at the desired location, said computer program product comprising:
-
computer readable program code for causing the computer to embed within said program thread at said desired location thereof a utility that is configured for creating a trace file if the trace file does not exist and which otherwise reads the trace file;
computer readable program code responsive to a flag being set to a first value for causing the computer to write to the trace file a traced value of a specified variable at the location in the program where the utility is embedded; and
computer readable program code responsive to the flag being set to a second value for causing the computer to invoke the utility on reaching said desired location for reading said trace file and invoking at least one predetermined debugger command that has been previously embedded in the trace file in place of the traced value of said variable. - View Dependent Claims (20)
-
-
21. A computer program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform a method for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said method comprising:
-
(a) embedding within the specific thread of the program at said desired location thereof a utility which;
i) if a compare flag is set to a first value, creates the trace file if it does not exist and writes to the trace file a traced value of at least one variable thereto at a desired location of the program; and
ii) if a compare flag is set to a second value, compares a current value of the least one variable with a respective line in the trace file and if they are different invokes a debugger so as to execute a debugger command embedded in the trace file in place of the traced value; and
(b) running the program so that on reaching said desired location, the utility is invoked for reading a modified trace file readable by the program wherein at least one traced value is replaced or augmented by said debugger command. - View Dependent Claims (22)
-
-
23. A computer program product comprising a computer useable medium having computer readable program code embodied therein for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said computer program product comprising:
-
computer readable program code for causing the computer to embed within the specific thread of the program at said desired location thereof a utility which reads a trace file in which said at least one predetermined debugger command has been previously embedded;
computer readable program code for causing the computer to create the trace file if the trace file does not exist, and being responsive to a compare flag being set to a first value to write a traced value of at least one variable thereto at a desired location of the program; and
computer readable program code responsive to the compare flag being set to a second value for causing the computer to compare a current value of the least one variable with a respective line in the trace file, and if they are different to invoke a debugger so as to execute a debugger command embedded in the trace file in place of the traced value; and
computer readable program code for causing the computer to run the program so that on reaching said desired location, the utility is invoked for reading a modified trace file readable by the program wherein at least one traced value is replaced or augmented by said debugger command. - View Dependent Claims (38)
-
-
24. A computer program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform a method steps for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said method comprising:
-
(a) if the trace file does not exist, creating the trace file;
(b) if a compare flag is set to a first value writing to the trace file a traced value of at least one variable thereto at a desired location of the program; and
(c) a compare flag is set to a second value, comparing a current value of said at least one variable with a respective line in the trace file and if they are different invoking a debugger so as to execute a debugger command embedded in the trace file in place of the traced value. - View Dependent Claims (39)
-
-
25. A computer program product comprising a computer useable medium having computer readable program code embodied therein for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said computer program product comprising:
-
computer readable program code for causing the computer to create the trace file if the trace file does not exist;
computer readable program code responsive to a compare flag being set to a first value for causing the computer to write a traced value of at least one variable thereto at a desired location of the program; and
computer readable program code responsive to the compare flag being set to a second value for causing the computer to compare a current value of the at least one variable with a respective line in the trace file, and if they are different to invoke a debugger so as to execute a debugger command embedded in the trace file in place of the traced value. - View Dependent Claims (40)
-
-
26. A computer-implemented system for automatically invoking at least one predetermined debugger command at a desired location of a single thread of a program containing at least one thread for debugging said single thread at the desired location, said system comprising:
-
a code modifier for embedding within said single thread at said desired location thereof a utility that is configured for creating a trace file if the trace file does not exist and which is responsive to a compare flag being set to a first value for writing to the trace file a traced value of at least one variable thereto at a desired location of the program; and
a processor responsive to the compare flag being set to a second value for invoking said utility for reading said trace file during running of the program upon reaching said desired location and invoking said at least one predetermined debugger command that has been previously embedded in the trace file in place of the traced value of said variable. - View Dependent Claims (27, 28, 29, 41)
-
-
30. A computer-implemented system for automatically invoking at least one predetermined debugger command at a desired location of a specific thread of a program containing at least one thread, said system comprising:
-
a code modifier for embedding within said single thread at said desired location thereof a utility which reads a trace file in which said at least one predetermined debugger command has been previously embedded;
a file management system coupled to the processor and responsive to said utility for creating the trace file if it does not exist;
a file modifier coupled to the file management system and responsive to a compare flag being set to a first value for writing to the trace file a traced value of at least one variable at said desired location of the program;
a processor for running the program so that on reaching said desired location, the utility is invoked for reading a modified trace file readable by the program wherein at least one traced value is replaced or augmented by said debugger command; and
a comparator coupled to the processor and responsive to a compare flag being set to a second value for comparing a current value of the least one variable with a respective line in the trace file and if they are different construing the respective line in the trace file as a debugger command and invoking a debugger so as to execute the debugger command. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 42)
-
Specification