LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2010, 07:22 PM   #1
skm123
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
gdb error


Hello guys,

I'm having problems trying to debug my code.

I have a simple code hello.c
=====================
#include <stdio.h>

main()
{
printf("hello, world\n");
}
======================

I compiled it : gcc -g hello.c -o hello

I wanted to debug it:

=================
gdb hello
GNU gdb (GDB) 7.0
Copyright (C) 2009 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 "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/hello...I'm sorry, Dave, I can't do that. Symbol format `elf64-x86-64' unknown.
(gdb)
=======================================================

uname -r
2.6.29.6-0.6.smp.gcc4.1.x86_64


Can somebody please help me as to why am I getting this error:

Symbol format `elf64-x86-64' unknown.


Thanks a lot

Shravan
 
Old 10-26-2010, 07:23 AM   #2
saurabh4lq
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Rep: Reputation: 0
Re:gdb problem

Look at this line from your post
>This GDB was configured as "x86_64-unknown-linux-gnu".

I think GDB is not able to identify your arch/platform.
What distro are you using?
Is the gdb you have installed comes from your distro repositories or
you downloaded it from some site ?
 
  


Reply


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
gdb compiling error shariefbe Linux - Software 1 01-05-2010 12:25 AM
gdb error sachinh Linux - General 1 11-19-2009 10:14 PM
gdb error lucky6969b Linux - Software 1 11-30-2005 09:26 PM
error in emacs with gdb varala_kanth Linux - Software 0 04-05-2004 02:40 AM
emacs with gdb error varala_kanth Linux - Software 0 04-03-2004 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:55 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration