LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 08-24-2010, 03:36 AM   #1
oddiofile
Member
 
Registered: Sep 2003
Location: Victoria, BC
Distribution: debian testing
Posts: 42

Rep: Reputation: 15
can't debug with gdb: not in executable format: File format not recognized (squeeze)


I am using debian squeeze.

2.6.32-5-vserver-amd64 #1 SMP Sat Jul 24 03:17:33 UTC 2010 x86_64 GNU/Linux

It seems my gdb is configured for i686 and not x64.

I can't create any executables with g++ that gdb is able to debug.
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
$ gdb a.out
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
"a.out": not in executable format: File format not recognized
(gdb)


I googled and found this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425838

It looks like a binutils incompatibility came up back in 2007 with lenny. Is it something similar?
 
Old 08-24-2010, 04:21 AM   #2
oddiofile
Member
 
Registered: Sep 2003
Location: Victoria, BC
Distribution: debian testing
Posts: 42

Original Poster
Rep: Reputation: 15
oops. just realized I was using a different version of gdb from the one installed by debian.
 
  


Reply

Tags
debian, gdb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Makefile: file not recognized:File format not recognized collect2: ld returned 1 exit Bringo Linux - Software 9 12-20-2010 05:08 AM
Compiler error : /usr/lib/libc.so: file not recognized: File format not recognized kreena Solaris / OpenSolaris 7 12-14-2009 03:51 AM
gdb: problem while debug an executable file smartgupta Programming 2 10-16-2008 05:51 AM
not in executable format: File format not recognized ypy13 Linux - Newbie 9 07-10-2008 12:33 AM
gdb "not in executable format: File format not recognized" tcma Programming 9 07-18-2007 07:02 AM


All times are GMT -5. The time now is 08:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration