]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove stop_registers
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 May 2015 18:47:33 +0000 (20:47 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 May 2015 18:49:45 +0000 (20:49 +0200)
Now stop_registers are no longer used and it can be removed.

I am not much sure what 'proceed_to_finish' really means now so I make a wild
guess while updating comments about it.

gdb/ChangeLog
2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdbthread.h (struct thread_control_state): Update comment for
proceed_to_finish.
* infcall.c (run_inferior_call): Update comment about
proceed_to_finish.
* infcmd.c (get_return_value): Update comment about stop_registers.
(finish_forward): Update comment about proceed_to_finish.
* infrun.c (stop_registers): Remove.
(clear_proceed_status, normal_stop): Remove stop_registers handling.
* infrun.h (stop_registers): Remove.

gdb/ChangeLog
gdb/gdbthread.h
gdb/infcall.c
gdb/infcmd.c
gdb/infrun.c
gdb/infrun.h

index 1d6cd4d6017e03e3f91b5133424f41857c5aa8c1..0b3862277911c69b81c346d46c16962196afeb81 100644 (file)
@@ -1,3 +1,15 @@
+2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdbthread.h (struct thread_control_state): Update comment for
+       proceed_to_finish.
+       * infcall.c (run_inferior_call): Update comment about
+       proceed_to_finish.
+       * infcmd.c (get_return_value): Update comment about stop_registers.
+       (finish_forward): Update comment about proceed_to_finish.
+       * infrun.c (stop_registers): Remove.
+       (clear_proceed_status, normal_stop): Remove stop_registers handling.
+       * infrun.h (stop_registers): Remove.
+
 2015-05-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * infcall.c (struct dummy_frame_context_saver)
index ff7cec2d0eaf333d0bd26fae0d351f7560e39eb4..0926f5f1c13b2970de0518d7d2b80d0d9ec3e9c2 100644 (file)
@@ -118,7 +118,7 @@ struct thread_control_state
   int trap_expected;
 
   /* Nonzero if the thread is being proceeded for a "finish" command
-     or a similar situation when stop_registers should be saved.  */
+     or a similar situation when return value should be printed.  */
   int proceed_to_finish;
 
   /* Nonzero if the thread is being proceeded for an inferior function
index d7515dd5f49b2614454c7ea32d0f95d3ab4a3533..5dd908d88d0d3b2ea4ef81011d925dd72bae2f77 100644 (file)
@@ -398,7 +398,7 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
 
   disable_watchpoints_before_interactive_call_start ();
 
-  /* We want stop_registers, please...  */
+  /* We want to print return value, please...  */
   call_thread->control.proceed_to_finish = 1;
 
   TRY
index 3d6c4c9a6169d24ddb92fb7aa43a771b63cf790b..03282a71da06f6280a1850522ed052fcf8faf859 100644 (file)
@@ -1519,7 +1519,7 @@ get_return_value (struct value *function, struct type *value_type,
   struct value *value;
   struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
 
-  /* If stop_registers were not saved, use the current registers.  */
+  /* If registers were not saved, use the current registers.  */
   if (ctx_saver != NULL)
     stop_regs = dummy_frame_context_saver_get_regs (ctx_saver);
   else
@@ -1786,7 +1786,7 @@ finish_forward (struct symbol *function, struct frame_info *frame)
   set_longjmp_breakpoint (tp, frame_id);
   make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
 
-  /* We want stop_registers, please...  */
+  /* We want to print return value, please...  */
   tp->control.proceed_to_finish = 1;
   cargs = xmalloc (sizeof (*cargs));
 
index a4f0b9f02e3c786d189c5b3cad51f51df181bf7e..71cf208e41fe63a809c1cfbcd620eaf362385488 100644 (file)
@@ -353,13 +353,6 @@ show_stop_on_solib_events (struct ui_file *file, int from_tty,
 
 int stop_after_trap;
 
-/* Save register contents here when executing a "finish" command or are
-   about to pop a stack dummy frame, if-and-only-if proceed_to_finish is set.
-   Thus this contains the return value from the called function (assuming
-   values are returned in a register).  */
-
-struct regcache *stop_registers;
-
 /* Nonzero after stop if current stack frame should be printed.  */
 
 static int stop_print_frame;
@@ -2505,12 +2498,6 @@ clear_proceed_status (int step)
   clear_step_over_info ();
 
   observer_notify_about_to_proceed ();
-
-  if (stop_registers)
-    {
-      regcache_xfree (stop_registers);
-      stop_registers = NULL;
-    }
 }
 
 /* Returns true if TP is still stopped at a breakpoint that needs
@@ -6697,20 +6684,6 @@ normal_stop (void)
        print_stop_event (&last);
     }
 
-  /* Save the function value return registers, if we care.
-     We might be about to restore their previous contents.  */
-  if (inferior_thread ()->control.proceed_to_finish
-      && execution_direction != EXEC_REVERSE)
-    {
-      /* This should not be necessary.  */
-      if (stop_registers)
-       regcache_xfree (stop_registers);
-
-      /* NB: The copy goes through to the target picking up the value of
-        all the registers.  */
-      stop_registers = regcache_dup (get_current_regcache ());
-    }
-
   if (stop_stack_dummy == STOP_STACK_DUMMY)
     {
       /* Pop the empty frame that contains the stack dummy.
index 1f09e41ca60c32c86dd2906556366073d86ed31a..75bb075fc1c01ce9acb4b981d163999eb5734d0c 100644 (file)
@@ -73,13 +73,6 @@ enum exec_direction_kind
    compatible with make_cleanup_restore_integer.  */
 extern int execution_direction;
 
-/* Save register contents here when executing a "finish" command or
-   are about to pop a stack dummy frame, if-and-only-if
-   proceed_to_finish is set.  Thus this contains the return value from
-   the called function (assuming values are returned in a
-   register).  */
-extern struct regcache *stop_registers;
-
 extern void start_remote (int from_tty);
 
 /* Clear out all variables saying what to do when inferior is