Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 ARM32 调试一个软件。我已经能够以编程方式调用 GDB 中的函数call,甚至可以使用print. 问题是我似乎无法在函数上设置断点,然后以编程方式调用它。例如,如果我这样做:
call
print
break test_function call test_function()
然后我收到错误消息
正在调试的程序在从 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.
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.
这不是错误。这正是您想要发生的事情:触发断点,您现在可以进行调试了。