LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gdb error (https://www.linuxquestions.org/questions/linux-newbie-8/gdb-error-835050/)

skm123 09-28-2010 06:22 PM

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

saurabh4lq 10-26-2010 06:23 AM

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 ?


All times are GMT -5. The time now is 02:20 AM.