This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: reverse-finish
- From: Michael Snyder <msnyder at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>, Stan Shebs <shebs at apple dot com>
- Date: Wed, 28 Sep 2005 11:26:46 -0700
- Subject: Re: RFC: reverse-finish
- References: <4331A3CF.5080700@redhat.com> <20050926014832.GF22284@nevyn.them.org>
Daniel Jacobowitz wrote:
On Wed, Sep 21, 2005 at 11:17:51AM -0700, Michael Snyder wrote:
+ if (find_pc_partial_function (get_frame_pc (get_current_frame ()),
+ NULL, &func_addr, NULL) == 0)
+ internal_error (__FILE__, __LINE__,
+ "Finish: couldn't find function.");
This shouldn't be an internal error; it's quite easy to provoke it from
the command line, so it should be at worst an error(). And please use
_() for the message eventually :-)
Sounds good.
+ sal = find_pc_line (func_addr, 0);
I think it's not a good idea to use the line table for this. You want
a breakpoint at, literally, the first instruction of the function. So
just create one. Avoids problems with broken line information, et
cetera.
Ah. You're right, I think I cut'n'pasted this from
step_into_function. In this context, we want to step
*out of* the function.
+ /* Tell the breakpoint to keep quiet. */
+ breakpoint_muzzle (breakpoint);
Not sure what this patch is against, but we don't have
breakpoint_muzzle :-)
Oh, sorry -- just a hack to keep the breakpoint
from being "mentioned". I'm sure there's a better
way of doing it.