(gdb) b processMessage
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) file aqm_wfmgr
Reading symbols from /home/dir/bin/mgr...done.
(gdb) b processMessage
Function "processMessage" not defined.
如何在该二进制文件的特定文件中为某个特定函数设置断点?
如果我给出直接行号或函数名称和文件名,它不会识别。请帮助。
(gdb) b 599
Cannot access memory at address 0x498f14
(gdb) b 598
Cannot access memory at address 0x498f14
(gdb) b processMessage 598
Function "processMessage" not defined.
答案 0 :(得分:1)
很可能你的二进制文件缺少调试信息。确保至少使用-g
进行编译(假设您使用的是gcc)。