Bug#39036: debugger code window current line handling is incorrect when carriage returns CR are present
Virgil at Nomadics.com
Virgil at Nomadics.com
Wed Mar 6 17:19:02 UTC 2002
Package: kdevelop
Version: 2.0.2 (using KDE 2.2.2 -2)
Severity: normal
Installed from: Red Hat Linux 7.2
Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
OS: Linux (i686) release 2.4.7-10
OS/Compiler notes:
When a code file containing CR LF pairs (DOS style newlines) is used to compile a program, and then that program is debugged the current line prompt is often incorrect and breakpoints fail to be associated with the proper line of code.
Unfortunately, this behavior does not seem as simple as to imply that the IDE miscounts a line at every CR. However, I've seen this extremely frequently when utilizing a file created using MSVC and occassionally edited with KDevelop.
In fact while I have not confirmed it this bug may well stem from some attempt to special case DOS style files that fails if the newline encoding is not consistent in the file.
In all observed cases stripping all CRs out of the file put an end to the behavior.
I personally assert that the best way to handle this old annoying issue is to interpret a line as ending at either a CR or a LF, but then if it is a CR check the next character and bypass it if it is a LF.
However, the issue in this specific case is that the IDEs line-counting differs from that of gdb and therefore there is confusion in the communications between the IDE and the debugger.
(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
More information about the KDevelop-devel
mailing list