This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: RFC: reverse-finish


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]