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 Fri, Aug 23, 2002 at 11:34:14AM -0700, Michael Snyder wrote:
> But I'm not convinced that the file:line behavior was meant to
> behave the same as the func_name behavior.  To me, associating 
> the prologue code with the open curly brace seems natural.
> You have to associate it with SOME line (or else make an even
> more special case out of it).  Haveing a way to specify it by
> line seems better than not having a way.  Likewise, it seems 
> practical to me that the epilogue code is associated with the
> close-curly brace.  That way there is a place to set a breakpoint
> after the function is finished but before it returns.

(Let's not go into "meant"; it doesn't matter what it was meant to do,
just what we want it to do, I think.  In this case.)

Here's another question.  Suppose we have that bane of line-based
debugging: a function all on one line.  Should clicking on that line
breakpoint you before the prologue or after?  I say, after.

GCC will emit a line marker for the prologue, and then a (same) line
marker for the function; I'd say we should prefer the second.

-- 
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]