Tools in Debugging
Tools in Debugging
gdb my_prog
ExitGDB:
quit
GDB Commands
Command names may be truncated if the abbreviation is
unambiguous: s (for step), r (for run)
UNIX style TAB completion for the command names.
Alternative way: complete chars.
Ex.: complete h
results in:
handle
hbreak
help
Gettinghelp:
help (or h) lists all classes of commands.
h command - displays a short description of the command
ptype var
Current value:
print var
Automatic display:
down n
Information about the current frame
frame brief description
info args shows function arguments
info locals shows local variables
height 0
width 0
verbose off
prompt (gdb) !
DDD View
argument
field
command
tool
source
window
debugger
console
Questions
1. How you create a symbol table?
2. How you load the symbol table of a program to GDB?
3. Where breakpoints can be set?
4. How many breakpoints can be set for a program?
5. Which command(s) can be used to exit from loops?
6. Which command goes into function calls?
7. What causes segmentation faults and bus errors?
8. What programming errors cause access to forbidden memory
addresses?
9. Which memory addresses are forbidden?