GDB no debugging symbols
Sébastien JEFFROY
sebastien.jeffroy.cxr at gmail.com
Thu Feb 7 17:44:45 UTC 2008
Hi all,
I have an arm7tdmi, and I compiled my source code with -g option.
My object files : *.o have .debug sections, but my output doesn't have it
after $(LINK.c) so I can't use gdb to debug my application.
I tried make VARIANT=dedbug and --enable-rtems-debug but I have a problem
with a missing file : start_g.o
How can I generate the debugging symbols ?
I read the FAQ about debugging :
http://www.rtems.com/wiki/index.php/DebuggingHints but I didn't find an
answer.
My configuration :
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).obj > $(basename $@).num;\
arm-rtems-objcopy \
--only-section=.text \
--only-section=.endtext \
--only-section=.begindata \
--only-section=.data \
--only-section=.enddata \
--only-section=.bss \
--only-section=.endbss \
$(basename $@).obj $(basename $@).obj;\
arm-rtems-objcopy --adjust-section-vma .data=`\
arm-rtems-objdump --section-headers $(basename $@).obj | \
awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
for (p=digits; p>0; p--) \
s += (16^(p-1)) * ( index("0123456789ABCDEF",\
substr(x,1+digits-p,1)) -1 );\
return s } ;\
/\.text/ { base = $$4 ; size = $$3 };\
END { printf("0x%x", h2d(base) + h2d(size)) }'` \
$(basename $@).obj $(basename $@).exe ;\
arm-rtems-objcopy --output-target=binary $(basename $@).exe $(basename
$@).lm;\
$(SIZE) $(basename $@).obj ;\
/opt/bin/chk1 -l $(basename $@).lm;\
test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin
endef
Thanks,
Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20080207/72a139b4/attachment.html>
More information about the users
mailing list