From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: gdb and c++ source Date: Thu, 07 Nov 1996 10:22:21 +0100 Organization: TU Chemnitz-Zwickau Lines: 42 Message-ID: <3281AA4D.7CCE@Mathematik.tu-chemnitz.de> References: NNTP-Posting-Host: tantalus-e.hrz.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Eli Zaretskii wrote: > > 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. > Because I haven't here the original post, I answer to Eli's answer. The problem with GDB and C++ is realy a hard problem. It is not common problem of GDB with handling C++ (GDB can handle C++ very good) but it is the problem with the debugging information. The format, which is used by DJGPP (SDB debug information) is not checked correctly by GDB or there is not all information, needed for debugging C++ programs. I have tried many, many tricks to get GDB work correct for C++ but nothing had the expected result. You can see the problem, when you look in the sources for GDB how it reads COFF files with SDB debug information. There is nowhere any code for detecting the language from the source file and there is also nowhere any code for handling C++ specific stuff. I have tried to modify it but this is very hard and I gave up. Now I'm using stabs debugging information (with my own patched gcc) and I must say, GDB is very powerfull in handling C++ programs. Robert -- ***************************************************************** * Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau * * Post: Am Berg 3, D-09573 Dittmannsdorf * * e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE * * WWW: http://www.tu-chemnitz.de/~rho * *****************************************************************