This is the mail archive of the gdb@sourceware.cygnus.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]

Re: Regressions problem (200 failures)


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Thu, 02 Mar 2000 02:34:20 -0800

   >>>>> "Peter" == Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE> writes:

       Peter> For practical debugging purposes (especially C++), the line
       Peter> number information (and thus the breakpoint) has to be put
       Peter> before the initialization code for local variables, so that
       Peter> we can debug object initialization.

   But the line number itself doesn't have to indicate the `{'; it could
   indicate the next line, if that's what GDB wants.  This is more
   possible than it used to be since the C++ front-end now puts out whole
   functions at once, rather than processing a statement at a time.

   Still, it's non-trivial.

The following might be relevant for this discussion:

The comment on symtab.c:find_function_start_sal() says:

/* Given a function symbol SYM, find the symtab and line for the start
   of the function.
   If the argument FUNFIRSTLINE is nonzero, we want the first line
   of real code inside the function.  */

If you look at the implementation of find_function_start_sal() you'll
see that it uses SKIP_PROLOGUE to skip over the function prologue if
FUNFIRSTLINE is nonzero, and then chooses the next line after the
prologue.  So GDB shouldn't have any problems with line notes for the
prologue.

The implementation of SKIP_PROLOGUE for the i386 lives in
i386-tdep.c:i386_skip_prologue().  According to the ChangeLog, this
code has not been changed since early 1994 (Hi Peter!), and it is not
unlikely that it has suffered some bit rot since then.  Are the
prologue's generated by GCC any different from those generated back in
1994?

Mark

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