[PATCH 3/5] gdb: rewrite header comment on async_init_signals
Pedro Alves
pedro@palves.net
Sat Jul 3 23:23:30 GMT 2021
On 2021-07-02 12:06 p.m., Andrew Burgess wrote:
> The header comment on the function async_init_signals was getting
> quite out of date, this commit just rewrites to (hopefully) reflect
> the current reality.
>
> There should be no user visible change after this commit.
>
> gdb/ChangeLog:
>
> * event-top.c (async_init_signals): Rewrite the header comment.
LGTM.
I think it'd be good to rename async_init_signals -> init_signals,
as there's no point in the "async" distinction anymore and this handles
sync signals too nowadays.
The SIGTRAP and SIGQUIT comments in the body of the function about passing
to the inferior looked mystifying at first, until I realized that by "passing",
this is talking about the disposition being inherited by gdb's
children (fork-child.c, etc.). Since we nowadays call
restore_original_signals_state right after forking, that commentary is obsolete.
The comment about vfork and BSD4.3 seems obsolete as well, since we don't bother
to restore gdb's signal dispositions in gdb after the child execs, the and vfork
parent unblocks, and nobody complained. We dropped support for BSD4.3 years
while ago.
I think this also means that changing SIGTRAP's disposition is pointless, we can
just let it be whatever was inherited like any other signal we don't handle.
More information about the Gdb-patches
mailing list