This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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]

RE: Trying to Debug Ecos using GDB


Thank you very much for that tip. I used an example hello world
application and linked it to ecos and have an executable image that can
be opened with GDB.

But now it seems like the executable image only has the symbols built in
for my hello.c program and no other kernel source files are present. How
can I build the application + library so that debug information for the
entire kernel is also present?

The resulting executable is only 2mb in size, the library with symbols
was 17mb, so obviously during the linking process all the debug symbols
got removed from the ecos kernel.

Thanks,

Fahd
 


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Andrew Lunn
Sent: Wednesday, April 12, 2006 3:00 PM
To: Fahd Abidi
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Trying to Debug Ecos using GDB


On Wed, Apr 12, 2006 at 01:39:24PM -0400, Fahd Abidi wrote:
> Hello,
> 
> I am using a BDI2000 JTAG emulator and am trying to debug the ecos 
> kernel at its startup and low level functions. I am getting stuck and 
> a very early point In the process, the Kernel Builds fine using the 
> cygwin based tools I got from ecos.sourceware.org and I have a 
> libtarget.a file created that has debug symbols in it. However I have 
> been unable to read the debug symbols from the file into gdb.
> 
> Using objdup -g to display the debug info says that the .o files 
> included have no recognized debugging info.
> 
> However using objdump-S shows that I do have source code intermixed 
> with the disassembly so it does find source code and hence must have 
> the debug info built in.
> 
> Using objcopy to strip the debug symbols takes the 16mb libtarget.a 
> file to 1.7mb so I am convinced the debug symbols are in the file.
> 
> If I try and open libtarget.a with GDB6.3&4 I get an error saying 
> "error not in executable format".

This is correct. libtarget.a is a library, not an application. 

You need to link the library to your application to form a complete
system image. Then boot that image.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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