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.
用 gdb 设置断点的 gdb 命令是什么? 我可以为特定函数设置断点,而不提供其行号作为参数吗?
您可以使用 GNU 调试器使用以下任何命令设置断点:
b <addr_or_function_symbol> b <function name> b *<instruction address> b <filename:line number> b <line number>
请注意,GDB 必须使用二进制/文件初始化(显然)。