Apparatus and method for debugging source code

Error detection/correction and fault detection/recovery – Data processing system error or fault handling – Reliability and availability

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000

Reexamination Certificate

active

06418543

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates generally to an automated tool for debugging a set of source code. More particularly, the present invention relates to a tool for debugging networking software using a test script.
2. Description of the Related Art
In a network, a number of computers are connected by transmission lines and switching elements. These switching elements are specialized computers used to connect two or more transmission lines and provide a mechanism for selecting one of the transmission lines each time a packet is transmitted. Common examples of switching elements are “routers” and “bridges”. Accordingly, the terms “switching element” and “router” are hereinafter used interchangeably.
Each router includes an operating system, or networking software. In order to verify that the router is functioning properly, the networking software must be adequately tested. Typically, this testing is a manual process during which a set of test commands are entered by a test engineer. During a test session, a log file is often recorded which includes the set of test commands and associated outputs. Searching the log file for error messages is traditionally performed manually. A log file may contain thousands of lines and searching through the log file for error messages can be a tedious process. Moreover, once pertinent commands are obtained from these log files, these commands must be manually reentered to recreate the testing scenario. Accordingly, the debugging of source code can be a time-consuming and cumbersome task.
Various debugging products are available for debugging source code written in various languages (e.g., C, C++). Using these debugging products, the values of various variables may be traced and lines of code may be stepped through to assist in debugging this source code. Such debugging tools commonly accept a program, or “source code”, as input and execute it at the user's desired pace, displaying the source code commands that were executed and outputs resulting from these executed commands (e.g., debug information and program output).
Although debugging tools typically accept the program to be debugged as input, debugging tools traditionally do not accept a log file as input for further testing of the source code that originated the log file or other source code. Moreover, debugging tools traditionally provide a set of debugging commands used to step through a portion of source code in order to debug the source code. However, such debugging tools have not been used to step through a test script or log file associated with a test script in order to test a separate set of source code such as networking software.
During testing of networking software, it is often necessary to test multiple code versions of the networking software, retest the networking software, or test different networking software which are likely to contain similar problems. In addition, since such errors may be due to hardware as well as software problems, it may be desirable to run the networking software on different test beds to ascertain the source of the problem. By way of example, if a test fails on two similar test beds, it can be inferred that the source of the problem is hardware related.
One of the most crucial aspects of the debugging process performed by an engineer is the creation of an error report. Without such a report, it would be impossible to track exactly which tests were performed and which of these tests failed. Moreover, it is imperative that the source code (e.g., version), configuration information, and hardware on which the source code is tested be carefully documented so that the test results may be reproduced at a later date. Typically, once testing is completed, the engineer performing the testing will prepare an error report documenting the test session. However, manual entry of such information is a time-consuming process. Therefore, it would be desirable if an error report could be generated automatically with little or no input from the engineer performing the testing.
In view of the above, it would be beneficial if an automated debugging tool were provided which would allow an engineer to recreate test situations to aid in ascertaining the cause of failure while testing a set of source code (e.g., networking software). In addition, it would be desirable if selected test commands obtained from a test script or associated log file could be rerun on the set of source code, or alternatively, used to test other sets of source code. Moreover, it would be beneficial if relevant commands that would aid in the debugging process could be provided.
SUMMARY OF THE INVENTION
The present invention provides a method and apparatus for debugging source code. This is accomplished through providing a set of debug commands designed to apply a set of test commands to the source code. The set of test commands may be obtained directly from a test script or from a log file created after executing the test script on a test bed running the source code to be debugged.
A method and tool for debugging a set of source code is disclosed. The source code may include communication software adapted for enabling communication between a set of devices. By way of example, the communication software may include networking software installed on a router. A plurality of test commands for testing the source code are obtained. The plurality of test commands may be obtained from a test script or a log file which contain the exact sequence of test commands needed to recreate the particular test scenario. For example, if the test script cannot be sequentially executed, a log file associated with the test script may be used.
A set of debugging commands for executing a set of the plurality of test commands is provided. The set of debugging commands include device commands and commands designed to assist in the debugging process. The device commands are designed to execute one or more commands on the test bed (e.g., device) running the source code. Device commands may include new test commands as well as commands designed to execute a set of the plurality of test commands. In contrast, the debug commands designed to assist in the debugging process provide information to assist in the debugging process, and are not run on the source code.
The source code is then debugged using the set of debugging commands. Through the debugging commands, selected ones of the plurality of test commands and new commands entered by a user may be executed on the source code. Output is obtained from the source code. This output may then be displayed. Moreover, the output associated with the execution of test commands may be logged in a log file or error report.
The advantages of the present invention are numerous. The present invention may be used to test source code such as networking software in a more efficient manner than traditional methods. Similarly, the present invention provides considerable time saving advantages while testing multiple versions of source code. In addition, the debugging tool may be used with various platforms, or test beds, to identify the source of a problem (e.g., hardware or software). Moreover, the present invention may be used to automatically generate an error report and other log files corresponding to a test session. In this manner, the time required to test source code may be substantially decreased. As a result, the production costs associated with testing source code may be significantly reduced.


REFERENCES:
patent: 5487169 (1996-01-01), Vraney et al.
patent: 5513315 (1996-04-01), Tierney et al.
patent: 6003143 (1999-12-01), Kim et al.
patent: 6058493 (2000-05-01), Talley
patent: 6161216 (2000-12-01), Shagam

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Apparatus and method for debugging source code does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Apparatus and method for debugging source code, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Apparatus and method for debugging source code will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2875546

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.