Guinevere Larsen
3cfa137ca5
gdb: Introduce RAII signal handler setter
...
This patch is motivated by the wait function for the record-full target,
that would install a custom signal handler for SIGINT, but could throw
an exception and never reset the SIGINT handler. This is clearly a bad
idea, so this patch introduces the class scoped_signal_handler in a new
.h file. The file is added to gdbsupport, even though only gdb code is
using it, because it feels like an addition that would be useful for
more than just directly gdb.
The implementation of the RAII class is based on the implementation
on gdb/utils.c. That is, it uses preprocessor ifdefs to probe for
sigaction support, and uses it if possible, defaulting to a raw call to
signal only if sigaction isn't supported. sigaction is preferred based
on the "portability" section of the manual page for the signal function.
There are 3 places where this class can just be dropped in,
gdb/record-full.c, gdb/utils.c and gdb/extension.c. This third place
already had a specialized RAII signal handler setter, but it is
substituted for the new general purpose one.
Approved-By: Tom Tromey <tom@tromey.com>
2024-11-22 17:38:31 -03:00
..
2024-01-12 15:49:57 +00:00
2020-03-05 15:59:22 +01:00
2024-01-10 19:52:52 -05:00
2023-11-15 12:53:04 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-10-19 08:10:38 +02:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-11-18 09:46:31 +01:00
2024-09-24 14:22:28 +02:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2021-07-26 12:20:33 +01:00
2024-02-21 13:30:19 -05:00
2024-03-26 21:13:22 -04:00
2024-02-27 10:30:29 -07:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-10-18 00:18:24 +02:00
2024-07-16 18:30:45 -04:00
2024-07-16 18:30:45 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-06-07 23:09:03 -04:00
2024-03-26 21:13:22 -04:00
2024-11-12 11:37:50 +01:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-09-07 21:48:34 +01:00
2024-08-14 11:20:57 +02:00
2024-01-12 15:49:57 +00:00
2024-08-14 11:20:57 +02:00
2024-08-14 11:20:57 +02:00
2024-06-10 08:25:56 +09:30
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-11-22 17:44:29 +01:00
2024-08-12 10:58:49 -04:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-07-16 18:30:45 -04:00
2024-04-21 19:54:27 -06:00
2024-01-12 15:49:57 +00:00
2024-11-22 17:44:29 +01:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-02-27 09:46:31 -07:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-03-21 12:21:24 -06:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-10-06 07:59:48 +02:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-06-27 15:15:26 +01:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-03-14 21:28:44 +01:00
2024-03-19 14:41:51 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-06-24 09:11:30 -06:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-09-13 07:38:56 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-10-10 17:36:21 +01:00
2024-10-10 17:36:21 +01:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-10-06 07:59:48 +02:00
2024-10-10 17:36:21 +01:00
2024-10-10 17:36:21 +01:00
2024-10-10 17:36:21 +01:00
2024-09-13 07:38:56 -04:00
2024-02-21 13:30:19 -05:00
2024-01-12 15:49:57 +00:00
2024-10-19 13:18:00 -06:00
2024-10-19 13:18:00 -06:00
2024-02-21 13:30:19 -05:00
2024-01-12 15:49:57 +00:00
2024-04-18 10:31:54 -04:00
2024-04-18 10:31:54 -04:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:47:56 +02:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-11-22 17:38:31 -03:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-08-12 10:21:15 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-03-26 21:13:22 -04:00
2024-10-10 17:36:21 +01:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00
2024-04-22 21:34:19 -04:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-01-12 15:49:57 +00:00
2024-08-02 16:54:52 -04:00
2024-09-25 11:06:57 +00:00
2024-03-26 21:13:22 -04:00
2024-01-12 15:49:57 +00:00