LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2005, 02:42 PM   #1
teval
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
Corrupted gdb frames


Hi,

I have this wierd error in gdb on my laptop.
I've tried recompiling gdb, and I've tried a few versions, including 6.3. It's an amd64 laptop running gentoo, with 2.6.10. It's always happened, across kernels, and across any kind of system library that I've updated in the past 6 months (which is all of them).

CFLAGS="-march=k8 -m64 -msse -mmmx -mfpmath=sse -m3dnow -funroll-loops -O3 -pipe"

Is what everything is compiled with.

When I run gdb and I want to see my call stack, bt, I get thousands of frames. An excerpt may be useful:

#2379 0x0000000000000000 in ?? ()
#2380 0x0000000000000001 in ?? ()
#2381 0x0000002a97373b51 in ?? ()
#2382 0x000000300000b340 in ?? ()
#2383 0x0000000000000000 in ?? ()
#2384 0x0000003000101880 in ?? ()
#2385 0x0000007fbfffef20 in ?? ()
#2386 0x0000003000009dd0 in ?? ()

At the end it stops with:

Cannot access memory at address 0x7fc0014f48

Of course the adresses are different depending on the program and where it was loaded.

All of this is intermixed with actual calls once in a long while for some programs, others report nothing but junk (including hundreds of frames consisting of 0x00....000 in ?? () ).

I don't omit frame pointers clearly, and I have tried different versions of gcc, from vanilla to the gentoo hardened patches.

Any idea what causes this?

Thanks
 
Old 01-26-2005, 03:31 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
using a -O optimization setting can screw gdb up. try -g3 instead (debug optimize). It might not be gdb, but the program itself. Also try to gdb a hand-compiled very simple program.
 
Old 01-31-2005, 08:00 AM   #3
teval
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Original Poster
Rep: Reputation: 30
Yes, I've tried everything I could think of in the compile-me-differently department.
Including compiling a very straighforward program (int main(){return 0;}, excuse the spacing) actually does the same thing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
normal gdb and spec gdb for kgdb Igor007 Programming 1 09-23-2005 04:15 PM
normal gdb and spec gdb for kgdb Igor007 Linux - Newbie 1 09-23-2005 01:41 PM
Possible to create a frames effect in an HTML page without using frames? furfurdemon666 General 10 12-12-2004 06:52 AM
gdb .. looking for 32 bit gdb.. for ia64 suse.. nkshirsagar SUSE / openSUSE 0 12-09-2004 03:02 AM
Frames? Phat420 Linux - Networking 2 03-19-2003 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration