+2020-10-29 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ PR gdb/19318
+ * inferior.c (detach_inferior_command): Restore the current thread.
+ (kill_inferior_command): Ditto.
+
2020-10-28 Tom de Vries <tdevries@suse.de>
PR symtab/26772
if (!args || !*args)
error (_("Requires argument (inferior id(s) to detach)"));
+ scoped_restore_current_thread restore_thread;
+
number_or_range_parser parser (args);
while (!parser.finished ())
{
if (!args || !*args)
error (_("Requires argument (inferior id(s) to kill)"));
+ scoped_restore_current_thread restore_thread;
+
number_or_range_parser parser (args);
while (!parser.finished ())
{
+2020-10-29 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ * gdb.base/kill-detach-inferiors-cmd.exp: Check that 'kill
+ inferiors' and 'detach inferiors' do not change the current
+ inferior.
+
2020-10-29 Tom de Vries <tdevries@suse.de>
* gdb.threads/tls.exp: Fix DUPLICATEs.
# Kill the first two inferiors, and detach the third.
gdb_test_no_output "kill inferiors 1 2"
+gdb_test "info inferiors 3" "\r\n\\* 3 \[^\r\n\]+" "inf 3 is still current"
gdb_test "inferior 1" "Switching to inferior 1.*"
gdb_test "kill" "The program is not being run.*"
gdb_test "detach inferiors 3" "Detaching from program.*process $test_pid.*"
+gdb_test "info inferiors 1" "\r\n\\* 1 \[^\r\n\]+" "inf 1 is still current"
# No inferiors should be running anymore.
gdb_test "kill inferiors 1 2 3" \