previous | start | next

GDB

A string address is stored at 8(ebp), how do you examine the string?

  x/s   *(int *) ($ebp + 8)      
   

The x applied to a memory address displays the address and its contents.

The x command can specify a repetition, a format, and a size!

  x/5dw  ($ebp - 24)
   

This would display 5 words (four byte) values in decimal format starting at the address -24(%ebp)



previous | start | next