gdb: ensure SIGINT is set to SIG_DFL during initialisation
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 22 Apr 2021 16:05:44 +0000 (17:05 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 28 Apr 2021 08:56:19 +0000 (09:56 +0100)
commit913832e99c5a1576663e52a4929b13bb263bd692
tree1506c80a86e2d4633e35628a8d421d9c6fc0122b
parenta3b5ef3e45642e2e162f02f125a2322c3d1ad95f
gdb: ensure SIGINT is set to SIG_DFL during initialisation

In order for our SIGINT handling to work correctly with Python we
require that SIGINT be set to SIG_DFL during Python's initialisation.

Currently this is the case, but, in a later commit I plan to delay the
initialisation of Python until after the point where GDB's own SIGINT
handler has been installed.

The consequence of this is that our SIGINT handling would become
broken.

In this commit I propose adding an RAII class that will ensure SIGINT
is set to SIG_DFL during the call to each extension languages
finish_initialization method.

At this point this change should have not effect.

gdb/ChangeLog:

* extension.c (struct scoped_default_signal): New struct.
(scoped_default_sigint): New typedef.
(finish_ext_lang_initialization): Make use of
scoped_default_sigint.
gdb/ChangeLog
gdb/extension.c
This page took 0.024424 seconds and 4 git commands to generate.