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]

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


If I understand, the change would be that, if I'm debugging in a
function called from GDB and I say "return", instead of finding
myself in the dummy "function called from GDB" I will find myself
all the way back in the original frame #0 that was current
before the fabricated function call.

This seems desireable, but since I'm already accustomed to the
old behavior, I'd like to hear if anybody else has any feelings
about it pro or con.

You say the behavior for "finish" has already been changed?

				Michael

Peter.Schauer wrote:
> 
> [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]