从子进程分叉后gdb分离

编程入门 行业动态 更新时间:2024-10-26 06:34:46
从子进程分叉后gdb分离 - 禁用?(gdb detaching after fork from child process - disable?)

在gdb中获取此消息。 我知道这不是一个错误或任何东西。 我也做了分页,所以这不是一个问题。

有什么办法可以压制这个消息吗?

Getting this message inside gdb. I know its not an error or anything. I also did pagination so thats not an issue.

Is there any way to suppress this message?

最满意答案

我很好奇,看到这个问题没有答案......

我获得了GDB手册 ,它说(部分 - PDF第9版的p33,对于gdb版本7.0.50.20091228):

要在下级启动时通知或在gdb的控制下退出,请使用set print inferior-events :

set print inferior-events set print inferior-events on set print inferior-events off

使用set print inferior-events命令,您可以在gdb发出新下级启动或下级已退出或已分离的消息时启用或禁用消息打印。 默认情况下,这些消息不会被打印。

show print inferior-events

显示当gdb检测到下级已经启动,退出或已经分离时是否打印消息。

我唯一担心的是它暗示你不应该默认看到这些消息。 只需确保您的设置与默认设置匹配,并且不要覆盖它们。

第4.11节“调试叉子”(第38-40页)看起来也与您相关。

I was curious to see that this question was unanswered...

I obtained the GDB manual, and it says (in part - p33 of the PDF 'Ninth Edition, for gdb version 7.0.50.20091228'):

To be notified when inferiors are started or exit under gdb’s control use set print inferior-events:

set print inferior-events set print inferior-events on set print inferior-events off

The set print inferior-events command allows you to enable or disable printing of messages when gdb notices that new inferiors have started or that inferiors have exited or have been detached. By default, these messages will not be printed.

show print inferior-events

Show whether messages will be printed when gdb detects that inferiors have started, exited or have been detached.

The only concern I have about this is that it implies that you should not be seeing the messages by default. Just make sure that your settings match the default and do not override them.

Section 4.11 'Debugging Forks' (pp38-40) looks relevant to you, too.

更多推荐

本文发布于:2023-07-25 05:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1256714.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:进程   从子   gdb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!