我正在开发一个应用程序,父母要求孩子处理某些任务.我遇到了一个问题,我将gdb配置为follow-fork-mode子,但是在fork之后,在到达断点之后,它发送了一个SIGTRAP,但是孩子以某种方式终止并将SIGCHLD发送给父节点.
我已经signal(SIGTRAP, SIG_IGN)
在fork 之前配置了所以我的理解是,当达到断点但是它没有发生时,孩子应该继承并忽略SIGTRAP.
如果我不对,请帮助我理解这一点.
如何成功调试子进程?
我使用安装在 pyenv 中的 python3.6.1。我在我的代码上运行 gdb 时遇到问题。当我运行gdb --args python mycode.py
它以错误结束"/home/vydra/.pyenv/shims/python": not in executable format: File format not recognized
我有一个 C 程序,它编写了一个非常复杂的脚本来运行它。我需要使用gdb
. 我试图运行脚本并将 gdb 附加到它的进程,但是我无法设置我需要的断点:
$ gdb median.o 27944
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please …
Run Code Online (Sandbox Code Playgroud)