This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Dwarf error opening ELF file with GDB 6.3


Hi there

I am building an executable for the MPC8260 processor. I have built my
toolchain for the 2.6 kernel and MPC8260 target using Kegel's crosstool.

When I try to load the built executable in GDB 6.3 (built for my target), I
get a dwarf error.

My compiler flags are:

For C++ files:

~ $
powerpc-603e-linux-gnu-g++  -finline-limit=7000 -fdollars-in-identifiers -DL
INUX -DLIN_HW -D_GNU_TOOL -D__LINUX -D__BIG_ENDIAN__   -fno-builtin  -msoft-
float -mcpu=603e -Wpointer-arith  -Winline -fPIC -ffunction-sections -fdata-
sections   -Wall  -gdwarf-2 -g2 -D_REENTRANT -DGLBTRACELEVEL=7 -DTRACE_RUNTI
ME_LEVEL=7 -DTRACE_CONSOLE_LEVEL=3 -D__cplusplus -fpermissive -fno-for-scope
 -Woverloaded-virtual -fno-rtti -o File.o -c File.cpp


For C files:

~ $
powerpc-603e-linux-gnu-gcc  -finline-limit=7000 -fdollars-in-identifiers -DL
INUX -DLIN_HW -D_GNU_TOOL -D__LINUX -D__BIG_ENDIAN__   -fno-builtin  -msoft-
float -mcpu=603e -Wpointer-arith  -Winline -fPIC -ffunction-sections -fdata-
sections   -Wall  -gdwarf-2 -g2 -D_REENTRANT -DGLBTRACELEVEL=7 -DTRACE_RUNTI
ME_LEVEL=7 -DTRACE_CONSOLE_LEVEL=3    -Wstrict-prototypes -o File.o -c
File.c


My linker options are:

~ $ powerpc-603e-linux-gnu-g++  -g (all object files here) -o Executable.out


Now, when I try to open this file with GDB, I get an error as follows:

~ $ powerpc-603e-linux-gnu-gdb  Executable.out
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as
"--host=i686-pc-linux-gnu --target=powerpc-603e-linux-gnu"...
Dwarf Error: Could not find abbrev number 112 [in module
/home/chandrashekharp/linux/project/devel/5X-Pilot/bin/LINUX/Executable.out]

(gdb)


Could this be due to some incorrect or misdirected compiler flags? Or
something else? Because I am able to load and debug simple applications like
the ubiquitous "Hello, World!" without any problem.

Please help me out!

Regards

Vijay Padiyar

http://www.vijaypadiyar.eu.tf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]