aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-07-24 13:58:47 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-07-27 12:44:12 -0400
commit077836f7cf6725386c01ae3bb7111663b8f2b85e (patch)
tree1fab6b1e4bd17d1c143c67067302a67265a42bb8 /gdb/ChangeLog
parent50904b25ecf09f14c9406157b7f51255b21f54c0 (diff)
downloadgdb-077836f7cf6725386c01ae3bb7111663b8f2b85e.zip
gdb-077836f7cf6725386c01ae3bb7111663b8f2b85e.tar.gz
gdb-077836f7cf6725386c01ae3bb7111663b8f2b85e.tar.bz2
Have SIGTERM promptly quit GDB even when the dummy target is active
GDB currently does not promptly quit after receiving a SIGTERM while no proper target is active. This is because in handle_sigterm we currently look at target_can_async_p to determine whether to asynchronously quit GDB using an async signal handler or to asynchronously quit using the quit flag. However, target_can_async_p is always false under the dummy target, so under this target we always use the quit flag and not the async signal handler to signal that GDB should quit. So GDB won't quit until a code path that checks the quit flag is executed. To fix this issue, this patch makes the SIGTERM handler no longer inspect target_can_async_p, and instead makes the handler unconditionally set the quit flag _and_ mark the corresponding async signal handler, so that if the target is async (or if it's the dummy target) then we will likely quit through the async signal handler, and if it's not async then we will likely quit through the quit flag. This redundant approach is similar to how we handle SIGINT. gdb/ChangeLog: * event-top.c (handle_sigterm): Don't inspect target_can_async_p. Always set the quit flag and always mark the async signal handler. gdb/testsuite/ChangeLog: * gdb.base/gdb-sigterm-2.exp: New test.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a6e993e..a03ca35 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-27 Patrick Palka <patrick@parcs.ath.cx>
+
+ * event-top.c (handle_sigterm): Don't inspect
+ target_can_async_p. Always set the quit flag and always mark
+ the async signal handler.
+
2015-07-27 Yao Qi <yao.qi@linaro.org>
* Makefile.in (REMOTE_EXAMPLES): Remove it.