RFC: reverse-finish

Michael Snyder msnyder@redhat.com
Wed Sep 28 18:26:00 GMT 2005


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.





More information about the Gdb-patches mailing list