[Bug c/47966] New: GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 Summary: GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0. Product: gcc Version: 4.4.3 Status: UNC

[Bug c/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #1 from Dainis Jonitis 2011-03-03 10:21:03 UTC --- Created attachment 23522 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23522 GCC generated wrong assembler file

[Bug c/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #2 from Dainis Jonitis 2011-03-03 10:21:44 UTC --- Created attachment 23523 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23523 nm utility output

[Bug c/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #3 from Dainis Jonitis 2011-03-03 10:22:33 UTC --- Created attachment 23524 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23524 objdump utility output with wrong N_LCSYM debugging information

[Bug c/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #4 from Dainis Jonitis 2011-03-03 10:22:57 UTC --- Created attachment 23525 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23525 makefile

[Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for global variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #6 from Dainis Jonitis 2011-03-03 14:40:18 UTC --- Problem is actually only with static file scope variables. Only then the N_LCSYM and N_STSYM stabs are used. With global variables there is no problem as N_GSYM stab is used instead.

[Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for static file scope variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #7 from Dainis Jonitis 2011-03-03 15:44:04 UTC --- Everything works fine in Ubuntu GDB, because the Assembler (2.20.1) is smart enough to ignore wrong debug symbols and still generate correct object file with correct addresses in stab

[Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for static file scope variables explicitly initialized with 0.

2011-03-03 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #9 from Dainis Jonitis 2011-03-04 07:48:45 UTC --- Unfortunately in legacy embedded systems it is not so easy to change toolchain. We switched from GCC 2.95.2 to 3.4.6 as the last one that supports a.out format. For us switching to EL

[Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for static file or function scope variables explicitly initialized with 0.

2011-03-04 Thread jonitis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966 --- Comment #10 from Dainis Jonitis 2011-03-04 14:55:56 UTC --- Actually the same problem is with function scope static variables. int main(int argc, char *argv[]) { static int fvar1; static int fvar2 = 0; static int fvar3 = 1;