函数中的 gdb 局部变量
gdb 有没有办法检查成员函数的局部变量以及类私有成员。有时,我需要知道哪些变量是函数的局部变量,哪些是类变量。
最好的, 乌穆特
Is there a way in gdb to check the local variables of a member function and also the class private members. Sometimes, I need to know which variables are local to the function and which ones are class variables.
Best,
Umut
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
info local
将打印所有局部变量的值(如果您还需要函数参数,请参阅 info args)
print *这
将显示成员变量。
info local
will print the values of all local variables (see info args if you also want function parameters)
print *this
will show the member variables.