Debugging in Programming:
A Debugging in Programming which allows you to load your object code program into system memory, execute the program, and debug it.
How does a debugger help in Debugging in Programming ?
1.The debugger allows you to check at the contents of registers and memory locations when the program execution is in process.
2.Debugging in Programming allows you to change the contents of registers and memory locations and reexecute the program.
3.Some debuggers allow you to stop execution after each instruction so you can check or alter memory and register contents.
4.A debugger also allows you to set a breakpoint at any point in your program. When you run a program, the system will execute instructions upto this breakpoint and stop. You can then examine register and memory contents to see if the results are correct at that point. If the results are correct, you can move the break point to a later point in your program. If results are not correct, you can check the program up to that point to find out why they are not correct.
In short, debugger tools can help you to isolate problems in your program.
The most commonly used tools are : single stepping and break point.
When single stepping tool is used, the system will execute one instruction and wait for further direction from user. Then user can examine the contents of registers and memory locations and if they are correct, user can tell the system to execute the next instruction. This feature is useful for debugging assembly language programs.
Break point function is often used as a Debugging aid in cases where single stepping provides more detail than wanted. When you insert a breakpoint, the system executes the instructions upto the breakpoint, and then goes to the breakpoint procedure.
In the break point procedure, you can write a program to display register contents, memory contents and other information that is required to debug your program. You can insert as many breakpoints as you want in your program.