我正在为ARM32调试一个软件.我已经能够以编程方式使用call或甚至在GDB中调用函数print.问题是我似乎无法在函数上设置断点,然后以编程方式调用它.例如,如果我这样做:
break test_function
call test_function()
Run Code Online (Sandbox Code Playgroud)
然后我收到错误信息
正在调试的程序在从GDB调用的函数中停止.评估包含该功能的表达.当函数执行完毕后,GDB将默默停止.
有没有办法以编程方式使用GDB调用函数并逐步执行它?
然后我收到错误信息
The program being debugged stopped while in a function called from GDB. Evaluation of the expression containing the function. When the function is done executing, GDB will silently stop.
这不是错误.这正是您想要发生的事情:一个断点被触发,您现在可以调试了.