In computer's terminology the word bugs means errors.It is used in the context of errors in programs.To debug means to eliminate program errors.Debugger is a program that helps in finding and correcting errors in user's programs.The program debugging and testing are also called verification and validation respectively.when programs are prepared,usually they contain some errors.They do not run correctly the first time. Compilers and interpreters include error-diagnostic features.such features detect errors which are due to the incorrect application of the language used to prepare the source program.Such errors are called syntax errors.The computer shows the errors on the screen and also indicates the erroneous statements.
A simple method of checking a program is single step control.By this technique program is executed step by step and intermediate results are observed.After executing one instruction,the programmer can examine registers,memory etc.to see the result after the execution of that instruction.At a time only one machine instruction is executed.The program checking by single step method becomes very difficult and time-consuming in case of a long program particularly when the error is towards the end of the program.Furthermore,if a loop occurs in a program,it becomes tedious job to cross the loop by single step control.For such situation there is another technique called break point technique which can be conveniently used for program checking.In this technique a break point using a software interrupt can be introduced at the suitable point in the program.
Important programs need thorough debugging and testing before they are used.There are a number of tools to debug programs. some important tools are:
(i) Simulators
(ii) Logic analyzers
(iii)Break points
(iv)Trace routines
(v) Memory dumps etc.
No comments:
Post a Comment