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. Here we mention six essential steps of testing, debugging and diagnostic a new software.
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 of a program involves validation of program design. Thus testing involving 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 features that aid the programmer in debugging tasks. Some of the common features are described below.
Steps of testing, debugging and diagnostic a new software
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 locations and determine accuracy of data.
Output Memory Content: The contents of a memory are transferred and store din 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, 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 reverse of the assembly process. The operation consists of reading out the contents of the program memory into assembly language.
You may like also
- Various Classification of Computer Software
- Preliminary Investigation of Software for Analysis
- Multimedia System Development Life Cycle (MSDLC)