GDB - Examining Data
Revision as of 09:31, 23 June 2015 by Jshankar (1 revision imported: EdWiki -- Emsys pages from Shukra)
- So far you’ve learned how to interrupt program flow at fixed, specified points, and how to continue stepping line-by-line.
- However, sooner or later you’re going to want to see things like the values of variables, etc.
- The print command prints the value of the variable specified, and print/x prints the value in hexadecimal:
(gdb) print my_var (gdb) print/x my_var