Right now I've been using GDB to disassemble a binary file and check out different registers and whatnot. Is there an easy command to examine everything on the stack? Can this be limited to everything in a function?
You can view the contents of the stack with x/10x $sp
This will print the top 10 elements of the stack.