Method and system for tracing and displaying execution of nested functions
First Claim
1. A method for identifying errors in the source code stored on a computer of program components comprising nested functions which may use return codes and executed in a multithread environment, said method comprising the steps of:
- using an editor operating on the computer, adding in the source code of said components at least the following macros;
an ENTRY macro at the beginning of each function, an EXIT macro at the normal execution end of each function, a TRACE macro wherever a specific information needs to be dumped and a QUIT macro in the code in the place where an unexpected condition occurs;
compiling source code into executable code using the code source compiler on the computer;
executing said executable code on the computer including trace macro code, each time an ENTRY or EXIT macro being executed, logging a trace record in a trace file comprising the name of the corresponding function, each time a TRACE macro being executed, logging a trace record in the trace file comprising the dumped specific information, and, each time a QUIT macro being executed, logging a trace record in the trace file comprising the name of the corresponding function and jumping to the execution of the EXIT macro of said corresponding function.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for tracing the failing or successful execution of nested functions coded with return codes in a thread during its execution. The method and system further allow accessing the thread execution information in the trace file and visualizing the tree structure of the nested functions and the result of the execution for each of them.
The method comprises an ENTRY and EXIT trace macro to mark the beginning and the end of execution of the function, a TRACE macro to record messages and program variable values and a QUIT macro marking the failing execution of the corresponding function. Using a Graphical User Interface, an interactive trace analyzer reads the trace file and display the tree structure of the nested functions and marks by using different colors the success of failure of each of them. The trace analyzer utilities helps the user to quickly identify the error in the source code corresponding to a function with a failing execution.
87 Citations
14 Claims
-
1. A method for identifying errors in the source code stored on a computer of program components comprising nested functions which may use return codes and executed in a multithread environment, said method comprising the steps of:
-
using an editor operating on the computer, adding in the source code of said components at least the following macros;
an ENTRY macro at the beginning of each function, an EXIT macro at the normal execution end of each function, a TRACE macro wherever a specific information needs to be dumped and a QUIT macro in the code in the place where an unexpected condition occurs;
compiling source code into executable code using the code source compiler on the computer;
executing said executable code on the computer including trace macro code, each time an ENTRY or EXIT macro being executed, logging a trace record in a trace file comprising the name of the corresponding function, each time a TRACE macro being executed, logging a trace record in the trace file comprising the dumped specific information, and, each time a QUIT macro being executed, logging a trace record in the trace file comprising the name of the corresponding function and jumping to the execution of the EXIT macro of said corresponding function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
Specification