Date: Wed, 6 Nov 1996 13:27:03 +0200 (IST) From: Eli Zaretskii To: Koen Van Herck Cc: djgpp AT delorie DOT com Subject: Re: gdb and c++ source In-Reply-To: <9611060945.AA08318@ivs4.> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 6 Nov 1996, Koen Van Herck wrote: > When I use gdb on a c++ program, gdb doesn't seem to recognize the > source (test.cc) as c++: language=unknown > When the program stops at a breakpoint the function name is not > demangled. Setting language=c++ doesn't change anything. Please post the gcc command line that you used to compile the program, and the exact messages printed by GDB when you try to debug it and see these problems. > Also, running gdb on a windows 3.11 dos box gives a seg. fault. That's a known limitation of the DJGPP debug system: breakpoints don't work on Windows 3.x (see section 18.11 of the DJGPP FAQ list). You should use the `hbreak' and `thbreak' commands available with GDB 4.16 (they set *hardware* breakpoints which use a different method that works on Windows 3.x). The number of hardware breakpoints is limited to 4, but if you never need more than that at a given time, that is your solution. > I'm using djgpp 2.0, gcc-2.7.2, gdb-4.16. Are you sure about v2.0 and GDB 4.16? If that is true, you are mixing v2.0 and v2.01 distributions (GDB 4.16 only appeared in v2.01). This is not recommended: you might stumble upon all kinds of incompatibilities that are subtle and hard to debug. Just toss v2.0 and install v2.01.