Testing, Debugging and Diagnostic Programs

Posted by Unknown Monday, July 22, 2013 0 comments
In system software we need to test, debug and diagnose various programs. Programs created by us are prone to error. It is not realistic to expect a newly created program to run correctly the first time. Before a program can be put into productive use it must be debugged. A bug is a defect or imperfection in a program. In the context of programming it is an error in a program that is responsible for undesirable results. Testing or a program involves validation of program design. Thus testing involves data that are intentionally used to reflect the worst-case situations.

In order to assist the programmer in locating and rectifying errors or bugs in programs, several tools are available. These tools could be hardware aids such as logic analyzers or software aids such as debug programs. A debug program is loaded into the memory with the object program that is to be debugged. If errors occur during run, the debug program is activated to identify, locate, and correct the error. A debug program generally includes several features that aid the programmer in debugging tasks. Some of the common features are described below.

Display Register Contents: This feature allows the programmer to check contents of certain registers of the CPU during the execution of a program. The contents of the registers can be printed or displayed on appropriate devices. It is also possible to modify the contents of some registers if necessary.

Display/Replace memory Contents: The programmer can access the contents of a memory location and display it. The contents can then be modified if necessary.

Memory Dump: This feature makes it possible to print the contents of a group of memory locations. Thus a programmer can view the contents of desired memory location and determine accuracy of data.

Output Memory Content: The contents of a memory are transferred and stored in some other mass storage devices such as disks or magnetic tapes.

Breakpoints: Breakpoints are interrupts in the object program. They are used to examine the current status of certain critical CPU registers, memory locations, or I/O ports. When the execution of the object program reaches a breakpoint; its execution is temporarily halted. The debug program then allows the programmer to examine and alter the contents of the selected register, memory locations, or I/O ports to correct errors.

Disassembly: This is the servers of the assembly process. The operation consists of reading out the contents of the program memory into assembly language.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...