Remove unnecessary inferior lookup in inferior_command
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 6 Dec 2016 21:19:33 +0000 (16:19 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 6 Dec 2016 21:19:33 +0000 (16:19 -0500)
In the case where we switch to a non-running inferior, we do a
"find_inferior_id (num)", although we did the same call right before.

gdb/ChangeLog:

* inferior.c (inferior_command): Remove duplicate
find_inferior_id call.

gdb/ChangeLog
gdb/inferior.c

index ea1cff35f83a63f9db5c6686c90719f8c11fc552..c2511502a8cbd72f929dc1aedec3272093d8e874 100644 (file)
@@ -1,3 +1,8 @@
+2016-12-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * inferior.c (inferior_command): Remove duplicate
+       find_inferior_id call.
+
 2016-12-06  Yao Qi  <yao.qi@linaro.org>
 
        * frame.c (frame_register_unwind): Set *realnump if *lvalp is
index 0abd2c058ef7b199d53e832d291a5fffb184c029..9fcdbd3b8303989ca429ff5e3d3a2b23943294d4 100644 (file)
@@ -763,9 +763,6 @@ inferior_command (char *args, int from_tty)
     }
   else
     {
-      struct inferior *inf;
-
-      inf = find_inferior_id (num);
       set_current_inferior (inf);
       switch_to_thread (null_ptid);
       set_current_program_space (inf->pspace);
This page took 0.041479 seconds and 4 git commands to generate.