Monday, June 21, 2010

GDB unknown commands

All in gdb> prompt

1. Ctrl + p => To get the previous command
2. p array@sizeof(array) => To print all the array elements
3. set print pretty on => To print the structure elements' values in a neat way
4. p /x => prints the value in hexa decimal format