GDB Commands, I made these for when I was taking CSE 127, and realized that they might be useful to more people. I didnn't write everything on this list, and the full list is available in the piazza
command | description |
---|---|
p &buf | gives u the address of buf |
p $ebp | gives you the address of ebp |
x/wx 0x1234567 | gives you the 4 byte word at a specific address (use this with buf and $ebp) |
x/10wx | you can specify how many words you want |
x/nx something | replace n with a number (e.g. 4, 8, ...) to get the hex values at n locations, starting at (something) and increasing in increments of 4 bytes. (added by Anon Comp) |