Strange behaviour of "cin"

Phil Edwards
Fri Feb 15 10:03:00 GMT 2002

On Fri, Feb 15, 2002 at 10:58:40PM +0530, Arun Saini , Gurgaon wrote:
> I have provided the trace that is withing the istream.tcc file of libstdc++
> and not of my code.

We realize that.  That's not the issue.

When you step through a compiled program in a debugger, the debugger doesn't
"know" what line is being executed.  It simply prints the line corresponding
to a line number stored in the program.

There have been problems with correct line numbers being emitted in C++
programs.  For example, line X is being compiled, but "line #Y" is stored
in the .o file.  Later, when you try to step through the code, the debugger
sees "line #Y" and displays line Y.  Since you're expecting to see line X,
confusion results.

This /might/ be the problem, but...

> I cannot post the code for legal reasons.

...then we probably cannot help you.  If you can reproduce the problem
with code you /can/ post, then the rest of us will have something to
experiment with.


If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

More information about the Libstdc++ mailing list