How do you debug code using the gdb debuggerSolutionGDB debu
How do you debug code using the gdb debugger?
Solution
GDB debugger helps us to run a program upto a certain point and we can pause the program there and print the values of the variables which we want to examine. We can make the values printed after every line too.
It doesnt work if the program has errors but it tells us about the memory leaks too.
Use the following command to install gdb:
It maintains a symbol table which contains all the variables and their values are updated after every step.
