www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/07/06:57:05

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT tu-chemnitz DOT de>
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: <Pine DOT SUN DOT 3 DOT 91 DOT 961106130635 DOT 939B-100000 AT is>
NNTP-Posting-Host: tantalus-e.hrz.tu-chemnitz.de
Mime-Version: 1.0
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                       *
*****************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019