This is the mail archive of the gdb@sourceware.org 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: Does GDB 6.7.1 for PowerPC require the framepointer register for backtracing?


On Mon, Feb 11, 2008 at 06:28:31PM +0100, Stefan Bylund wrote:
> Hi Daniel,
>
> Thanks for your information. We use GCC 3.4.4, and when debugging we use  
> the compiler options -g -O0. I tried to add the compiler option  
> -fomit-frame-pointer (which seems to be included by -O1 and higher but  
> not by -O0) and then it works!!! So, my conclusion is that GDB 6.7.1 for  
> PowerPC tries to take advantage of frame pointer information in the  
> DWARF-2 debug information while GDB 6.3 does not. Is that correct? Is it  
> always safe to use -fomit-frame-pointer on PowerPC, i.e. will it not make 
> some type of C/C++ code undebuggable?

GDB 6.7 does use DWARF.  GDB 6.3 did not.

It sounds to me like you have a bug in the debug information generated
by your compiler.  I've seen some other bugs in the unwind tables
generated by GCC 3.4.x that were fixed in GCC 4.x.

-fomit-frame-pointer should not cause a problem for GDB as long as you
have valid DWARF information.

-- 
Daniel Jacobowitz
CodeSourcery


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