currently I am doing a CTF challenge and I use gdb a lot. For overflows (getting information via printf or overwriting the RET pointer with puts) it is very helpful to get the locals pointer from the info frame command (because here you will find the stack canary and the return pointer):
Stack level 5, frame at 0x7fff2baf0c70:
rip = 0x55cf7d42e27f in cannary_words (main.c:40); saved rip = 0x55cf7d42e36a
called by frame at 0x7fff2baf0c90, caller of frame at 0x7fff2baf0bb0
source language c.
Arglist at 0x7fff2baf0c60, args:
Locals at 0x7fff2baf0c60, Previous frame's sp is 0x7fff2baf0c70
Saved registers:
rbp at 0x7fff2baf0c60, rip at 0x7fff2baf0c68
In this example the locals pointer is 0x7fff2baf0c60. Because it is very tedious to copy it by hand all the time and not nice for scripting I would like to know if there is a convenience variable that stores its value.
By trial and error I found $rip is holding the rip value. I could not find anything helpful with the show convenience command.
Anybody an idea?