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: Should GCC tell GDB about its optimizations?




From: Stan Shebs <shebs@apple.com>
>But today, the result is just lame; hackers
t>rying to debug get lots of squirrelly behavior from GDB.


  What sort of squirrelly behavior are you talking about exactly?  If it is 
just the typical problem where GCC reuses register's and stack locations 
when variables lifetime's are over, this would seem like a gdb problem, not 
a GCC problem.  gdb should be able to look at the debugging info and notice 
that the variable you are trying to print is not currently live.  It could 
then print out a message that says so, rather than printing out whatever 
random crud happens to be at the place of the variable's death.

  Of course, I only know about the stabs format (and only as used on MacOS X 
Server/MacOS X) -- this format seems to provide enough information to 
implement this behavior in gdb.  I would assume that other debug info 
formats would have the same information.

  Is there some other behavior that isn't covered by the above?

-tim

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