尝试 "strace" 时 GDB 的 "No symbol table is loaded"

GDB's "No symbol table is loaded" when trying to "strace"

我正在尝试 strace 通过 gdb 在系统上使用 strace -p <pid> 线程(或进程,就此而言)。 我收到以下消息:

No symbol table is loaded. Use the "file" command.

Make static tracepoint pending on future shared library load? (y or [n])

我见过提供使用 file <file-name> 的解决方案,但就我而言,当我没有文件到 运行 时,我必须做什么?

谢谢。

您要找的strace是命令行工具,不是GDB命令。退出 GDB 到 运行 它。