www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/05/05:28:19

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Tue, 5 Feb 2002 12:24:54 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Matthew Smith <matt AT the-good-stuff DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Debugging in RHIDE (1.4.9)
In-Reply-To: <a3n8cv$jpv$1@newsg1.svr.pol.co.uk>
Message-ID: <Pine.SUN.3.91.1020205122131.22332A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 5 Feb 2002, Matthew Smith wrote:

> > of a class member functions, but it is impossible to set a
> breakpoint in .h
> > file.
> 
> You should not have executable code in a .h file, so breakpoints there
> are unnecessary

Unfortunately, the standard C++ headers have _a_lot_ of executable code 
in it, so your recommendation is impractical.  With some C++ techniques, 
having executable code in a header is one of the recommended practices as 
well.
> Not until gcc is fixed to produce the right line numbers.  Ideally
> RHIDE/gdb could be
> adjusted to step to lines with no generated code too, by taking the
> next line which does have code.

That would cause terrible mistakes in many cases, especially close to end 
of one function and beginning of another.

The compiler should generate the correct info, and the debugger should 
interpret it correctly.  Unfortunately, with the introduction of GCC 3.x, 
things are in a state of flux on both ends, and it will take some time 
until debugging serious C++ programs becomes reasonably possible again.

- Raw text -


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