如何使用 GDB 检查堆栈帧? [英] How can I examine the stack frame with GDB?

查看:32
本文介绍了如何使用 GDB 检查堆栈帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我一直在使用 GDB 反汇编二进制文件并检查不同的寄存器等等.是否有一个简单的命令来检查堆栈上的所有内容?这可以仅限于函数中的所有内容吗?

Right now I've been using GDB to disassemble a binary file and check out different registers and whatnot. Is there an easy command to examine everything on the stack? Can this be limited to everything in a function?

推荐答案

对于当前栈帧:

  • 信息框架列出有关框架的一般信息(事物在内存中的起始位置等)
  • info args 列出函数的参数
  • info locals列出存储在框架中的局部变量
  • info frame lists general info about the frame (where things start in memory, etc.)
  • info args lists arguments to the function
  • info locals lists local variables stored in the frame

这篇关于如何使用 GDB 检查堆栈帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆