是否可以获得正在运行的进程及其符号表的核心转储?
是否可以获取 gdb 或使用其他一些工具来创建正在运行的进程及其符号表的核心转储? 如果有一种方法可以在不终止进程的情况下执行此操作,那就太好了。
如果可能的话,您会使用什么命令? (我正在尝试在 Linux 机器上执行此操作)
Is it possible to get gdb or use some other tools to create a core dump of a running process and it's symbol table? It would be great if there's a way to do this without terminating the process.
If this is possible, what commands would you use? (I'm trying to do this on a Linux box)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
或者运行
gcore $(pidof processname)
。这样做的好处是(相对于运行 gdb 并向 CLI 发出命令)您可以在尽可能短的时间内附加和分离。
Or run
gcore $(pidof processname)
.This has the benefit (over running gdb and issuing commands to the CLI) that you attach and detach in the shortest possible time.
您可以在gdb中使用
generate-core-file
命令来生成正在运行的进程的核心转储。You can used
generate-core-file
command in gdb to generate core dump of running process.