aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2021-01-11 18:52:12 +0000
committerPedro Alves <pedro@palves.net>2021-02-03 01:15:05 +0000
commit9147506842aaedfa90e89dd7f4913a990dbf947d (patch)
tree3940a4648e610afba45c04ff8ab5113e104c66db /gdb/ChangeLog
parentd758e62c0ecca0c26547cfe40aa1f32d6e8464b7 (diff)
downloadgdb-9147506842aaedfa90e89dd7f4913a990dbf947d.zip
gdb-9147506842aaedfa90e89dd7f4913a990dbf947d.tar.gz
gdb-9147506842aaedfa90e89dd7f4913a990dbf947d.tar.bz2
prepare_for_detach: don't release scoped_restore at the end
After detaching from a process, the inf->detaching flag is inadvertently left set to true. If you afterwards reuse the same inferior to start a new process, GDB will mishave... The problem is that prepare_for_detach discards the scoped_restore at the end, while the intention is for the flag to be set only for the duration of prepare_for_detach. This was already a bug in the original commit that added prepare_for_detach, commit 24291992dac3 ("PR gdb/11321"), by yours truly. Back then, we still used cleanups, and the function called discard_cleanups instead of do_cleanups, by mistake. gdb/ChangeLog: * infrun.c (prepare_for_detach): Don't release scoped_restore before returning.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 920df3e..256b9d0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-02-03 Pedro Alves <pedro@palves.net>
+ * infrun.c (prepare_for_detach): Don't release scoped_restore
+ before returning.
+
+2021-02-03 Pedro Alves <pedro@palves.net>
+
* infrun.c (handle_one): New function, factored out from ...
(stop_all_threads): ... here.