How to list all variables in the current context in gdb?

In gdb, after reaching a breakpoint, I want to list all the variables in the current context, instead of giving each variable name explicitly? Is there any way to achieve this at all?


You want info locals. Or, if you are getting a back trace, bt full.

You can attach info locals to a breakpoint with the commands command.