
Prakrati A. answered 06/01/19
Software Engineer with 7+ years of teaching experience in C and Java
Yes, it is possible to print all local and global variables in gdb. You can use info variables to get all global/static variables.
You can use info locals after using the select-frame level to get all local variables
You can use info arts to list all arguments of current stack frame.