This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] stack.c: Silently pop dummy frame after `return' from stop in dummy


[RFA] stack.c:  Silently pop dummy frame after `return' from stop in dummy

If a `return' is issued after a stop in a call dummy, the dummy frame is
currently not popped. This is inconsistent with the behaviour after a finish
from a stop in a call dummy.

Here is a fix, it will be needed for the upcoming additional callfuncs
testcases:

	* stack.c (return_command):  Pop dummy frame if we just returned from
	a stop in a call dummy.

*** ./stack.c.orig	Sat Aug  5 11:37:49 2000
--- ./stack.c	Fri Sep 15 21:36:51 2000
***************
*** 1892,1897 ****
--- 1892,1903 ----
    if (retval_exp)
      set_return_value (return_value);
  
+   /* If we are at the end of a call dummy now, pop the dummy frame too.  */
+ 
+   if (CALL_DUMMY_HAS_COMPLETED (read_pc(), read_sp (),
+ 				FRAME_FP (get_current_frame ())))
+     POP_FRAME;
+ 
    /* If interactive, print the frame that is now current.  */
  
    if (from_tty)

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]