This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] stack.c: Silently pop dummy frame after `return' from stop in dummy
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA] stack.c: Silently pop dummy frame after `return' from stop in dummy
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Sat, 23 Sep 2000 12:31:05 MET DST
[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