This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: reverse-finish
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>,Stan Shebs <shebs at apple dot com>
- Date: Sun, 25 Sep 2005 21:48:32 -0400
- Subject: Re: RFC: reverse-finish
- References: <4331A3CF.5080700@redhat.com>
On Wed, Sep 21, 2005 at 11:17:51AM -0700, Michael Snyder wrote:
> Following on to my patch of 9/7 implementing reverse-step, reverse-next
> and reverse-continue, this patch is sufficient to implement
> reverse-finish. This is meant for discussion, not approval (I don't
> plan to check anything in right away).
As with the previous patch: looks plausible to me, kind of ugly, so is
anything in infrun.
> + 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 :-)
> + 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.
> + /* Tell the breakpoint to keep quiet. */
> + breakpoint_muzzle (breakpoint);
Not sure what this patch is against, but we don't have
breakpoint_muzzle :-)
--
Daniel Jacobowitz
CodeSourcery, LLC