Mail Archives: djgpp/2002/02/05/05:28:19
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 -