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: Re: Trying to Debug Ecos using GDB


Yes the kernel is built with debug symbols. I checked the libtarget.a
file with objdump -s and saw disassembly and source code. So its in
there. Libtarget.a is 17mb, if I strip it of symbols using objcopy -g
then it drops to 1.7mb.

When I go to the steps of linking with my application the final hello
executable leaves out the symbols from the kernel.

I may not be following what Andrew is saying, as far as I can tell I
have included the debug symbols from all Parts of the kernel that are
used, the appropriate setting in the kernel to enable debug bits is set.
The -g CFLAG bit is set in the top level of the ecos project, so all
debug symbols should be added.

The resulting hello executable only has source info for hello.c no other
sources are in that executable. I checked the compiler output and saw
the -g flag getting passed to the application as well.

Thanks for all you help in getting to the bottom of this. I need to get
an executable that has kernel debug info, it seems like you were able to
create one at some point. Any tips or pointers you can give will be most
appreciated. I am including the output of the make file, maybe you guys
can spot something in there:

$ make
powerpc-eabi-gcc -c -g -mcpu=603e -Wall -Wpointer-arith
-Wstrict-prototypes -Win
line -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections
-fdata-sections -fn
o-rtti -fno-exceptions -fvtable-gc -finit-priority
-I/ecos-c/cygwin/home/ecos/ra
ttler8250/rattler8250_install/include hello.c
powerpc-eabi-gcc -g -mcpu=603e -g -nostdlib -Wl,--gc-sections
-Wl,-static -L/eco
s-c/cygwin/home/ecos/rattler8250/rattler8250_install/lib -Ttarget.ld
hello.o -o
hello

Thanks,

Fahd
 


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Grant
Edwards
Sent: Wednesday, April 12, 2006 6:16 PM
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Re: Trying to Debug Ecos using GDB


In gmane.os.ecos.general, you wrote:
> On Wed, Apr 12, 2006 at 04:46:21PM -0400, Fahd Abidi wrote:
>> I'm trying to create a test case where I will use a BDI2000 JTAG 
>> emulator to debug the ecos kernel, for that I need an image that has 
>> all the symbols built in. I will then strip the executable to create 
>> an image that does not have any debug symbols to load onto the 
>> target, that way I can debug the kernel thru a JTAG probe. The larger

>> image with debug symbols is used only on the host GDB and the stipped

>> executable sits on the target.
>> 
>> Is this possible? Is there any way to tell the linker to leave the 
>> debug symbols in place?
>
> After linking with the application to form an image The debug symbols 
> will be in place, but just symbols you need. The debug information for

> symbols that are not in the image will not be in the image.

Is the kernel built with debug symbols enabled?  I recall having to
tweak on something to get that enabled.

-- 
Grant Edwards                   grante             Yow!  Do you guys
know we
                                  at               just passed thru a
BLACK
                               visi.com            HOLE in space?

-- 
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]