Date: Thu, 23 Jan 1997 09:04:26 +0200 (IST) From: Eli Zaretskii To: frazer AT rtp DOT ericsson DOT se cc: djgpp AT delorie DOT com Subject: Re: GDB and static variables In-Reply-To: <5c553u$jr6@cnn.exu.ericsson.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 22 Jan 1997 frazer AT rtp DOT ericsson DOT se wrote: > I am having problems with GDB and static variables. GDB seems > to have problems with debugging information for uninitialized > static variables. Here is a test program which exhibits the > strangeness: [snip] > Now I compile with DJGPP v2.01 and GCC 2.7.2.1: > > C:\TEST>gcc -c -m486 -Wall -g -o main.o main.c Does the same happen if you compile without -m486? Maybe that switch causes gcc to optimize the code, whereby it's OK if the code isn't exactly like the source.