www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/29/09:35:29

Date: Wed, 29 Dec 1999 10:26:50 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Leon <Leon AT caresystems DOT com DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: ouch - break points in cpp file of template class using gdb ;-)
In-Reply-To: <002d01bf517f$71cb2b60$1c00000a@cristian.caresystems.com.au>
Message-ID: <Pine.SUN.3.91.991229102416.11728R-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 29 Dec 1999, Leon wrote:

> but - how would one put a break point in a cpp file of a TEMPLATE class?
> 
> i pesume that the source file of a template class is not created in general
> but the each instance of the template type provided and thus the error of
> "cannot find such a source file" is provided by gdb?

One of the subcommands of GDB's "info" command will display all the 
symbols that GDB knows about in your program.  You could use this feature 
to find the name of the function where you want to put a breakpoint.

Another hint is to use the -gstabs+ switch when compiling your program,
it generates debug info which supports C++ programs much better than the 
default -g.  This is explained in the FAQ.

- Raw text -


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