The sole caller of exit_inferior_num_silent was getting the inferior's
number to then use the number to look up the inferior again. I think
it's better to simply not have exit_inferior_num_silent; any potential
callers that only have the inferior's number should probably be
converted to pass the inferior itself around instead.
Tested by the buildbot.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* infrun.c (follow_exec): Use exit_inferior_silent.
* inferior.c (exit_inferior_num_silent): Remove.
* inferior.h (exit_inferior_num_silent): Don't declare.
+2018-07-03 Tom Tromey <tom@tromey.com>
+
+ * infrun.c (follow_exec): Use exit_inferior_silent.
+ * inferior.c (exit_inferior_num_silent): Remove.
+ * inferior.h (exit_inferior_num_silent): Don't declare.
+
2018-07-03 Tom Tromey <tom@tromey.com>
PR cli/23340:
exit_inferior_1 (inf, 1);
}
-void
-exit_inferior_num_silent (int num)
-{
- struct inferior *inf = find_inferior_id (num);
-
- exit_inferior_1 (inf, 1);
-}
-
/* See inferior.h. */
void
/* Do exit processing for the original inferior before adding
the new inferior so we don't have two active inferiors with
the same ptid, which can confuse find_inferior_ptid. */
- exit_inferior_num_silent (current_inferior ()->num);
+ exit_inferior_silent (current_inferior ());
inf = add_inferior_with_spaces ();
inf->pid = pid;