incorrect debug information with -O2 and above options
M R Swami Reddy
MR.Swami.Reddy@nsc.com
Thu Nov 13 12:38:00 GMT 2008
Hello,
I am using the crx target (ie crx-elf-gcc) compiler. When I compile a simple
testcase with -g, its showing correct debug information. If I compile the
same testcase with "-g -O2" (-O2 or above optimizations), then compiler
generates wrong debug info. Could you please advise on this issue?
=========================================================================
With -g command line option:
---------------------------
> crx-elf-gcc align/1.c -g
/tmp/ccC6aaaa.o: In function `main':
align/1.c:3: undefined reference to `one'
With -g -O2 command line options:
---------------------------------
> crx-elf-gcc align/1.c -g -O2
/CRX12-1.10/crx-elf/bin/ld: Dwarf Error: DW_FORM_strp offset (84)
greater than or equal to .debug_str size (47).
/tmp/cck5aaaa.o: In function `.LSM1': //** ERROR **//
align/1.c:3: undefined reference to `one'
===
Thanks in advance.
Thanks
Swami
More information about the Gcc-help
mailing list