This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: What should "finish" do?
- To: kevinb at cygnus dot com
- Subject: Re: What should "finish" do?
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Wed, 3 May 2000 04:10:06 -0400 (EDT)
- CC: gdb at sourceware dot cygnus dot com
- References: <1000502234443.ZM27954@ocotillo.lan>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Tue, 2 May 2000 16:44:43 -0700
> From: Kevin Buettner <kevinb@cygnus.com>
>
> As I see it, there are two sensible options:
>
> 1) "finish" should finish executing the current function and cause
> execution to stop when control is returned to the caller (at the
> earliest point).
>
> 2) "finish" should finish executing the current function and cause
> execution to stop when control is returned to the caller, but
> after whatever (architecture specific, perhaps even compiler
> specific) instructions are used to restore the caller-save
> registers.
I think the second alternative is a better one.
> Note that stopping at the next line is not a sensible option because
> if you finish out of g() in f(g()), it is an error to stop execution
> at the next line. I.e, you want to have the opportunity to step into
> f().
Yes, this is granted.