This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Does GDB 6.7.1 for PowerPC require the framepointer register for backtracing?
Hi Daniel,
Thanks for all your valuable answers! We will use -fomit-frame-pointer
as a workaround for now. Later on we will add support for handling the
frame pointer register in our OS kernel. That seems to be the
future-proof solution.
Regards,
Stefan
Daniel Jacobowitz wrote:
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.
--
---------------------------------
Stefan Bylund
Senior Software Engineer
Enea
Skalholtsgatan 9,
Box 1033, SE-164 21 Kista, Sweden
Direct: +46 8 50 71 43 25
Mobile: +46 709 71 43 25
stefan.bylund@enea.com
www.enea.com
---------------------------------
Enea - Embedded for Leaders
---------------------------------