This is the mail archive of the gdb-patches@sources.redhat.com 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] breakpoints and function prologues...


On Sun, Aug 25, 2002 at 10:33:18AM -0400, Andrew Cagney wrote:
> >Yes, we could change -break-insert to do this.
> >
> >It would still break when somebody uses the console to set breakpoints 
> >from within Project Builder, however.  Like with Insight, we try to 
> >support the console as well as we can from PB (we don't do as good a job 
> >as Insight, but we are working towards it).
> 
> We're talking Mac here right?  I thought (sarcasm) Mac users did 
> everything using the GUI and AppleScript.
> 
> >I guess we could go note the breakpoint set event, delete the breakpoint 
> >that was just set IF it was set with file:line, and reset it with the 
> >"move me past the prologue" cookie.  But this seems a bit of a hack.
> 
> Is your [apple] bug with a GUI user finding that a breakpoint on a 
> function confuses the GUI; or with a GUI user finding that entering the 
> CLI command ``break file.c:10'' confuses the GUI?  (A CLI user would 
> have used ``break func'' :-)
> 
> We've concluded that the former can be fixed without any need to change 
> the CLI.

But I still believe that the CLI command should skip prologues in the
first place, for at least as long as ``break func'' does.

And a CLI user might _not_ have used break func.  Here's a perfectly
good reason why: static functions do not have unique names (they don't
always have unique line numbers either but that's a different problem). 
Sometimes placing breakpoints by line number is the only way to get
them in the right place.  This happens in BFD all the time.

> For the latter, the user can still enter ``break *0x1234'' and confuse 
> the GUI.  Should GDB ``helpfully'' move that as well?  I think the only 
> thing that can be done is ensure that the GUI doesn't get confused (or 
> at least gets confused gracefully :-).  For instance, realise that its 
> got a PC in the prologue and display ``incomplete stack frame''.

I agree that the GUI should not get confused.  But I'd still like to
see break line and break func work the same way.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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