How to list all variables in the current context in gdb?
在gdb中,到达断点后,我想列出当前上下文中的所有变量,而不是显式地给出每个变量的名称?有什么办法可以做到这一点吗?
- 我不认为只有一个命令,但这应该足够接近:stackoverflow.com/questions/6261392/…
你要的是info locals。或者,如果你得到了一个回溯,bt full。
可以使用commands命令将info locals附加到断点。