0x00 前言
使用gdb下完断点是不是有一种懵逼的感觉,如果能看到当前的全部变量,你将豁然开朗。
0x01 查看全局和静态变量
info variables
0x02 查看当前stack frame局部变量
info locals
0x03 查看当前stack frame参数
info args
0x04 使用效果
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190212142120184.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2NvdW5zZWxsb3I=,size_16,color_FFFFFF,t_70)
在windbg下,kb会显示返回地址和参数列表。如果要看局部变量的话,还没找到相关的方法,如果各位道友有知道的,请不吝赐教~
0x05 参考文献
https://stackoverflow.com/questions/16891200/how-to-list-all-variables-in-the-current-context-in-gdb/16898998