This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB doesn't show the correct line


> Cc: otto.wyss@orpatec.ch, gdb@sources.redhat.com
> From: Tom Tromey <tromey@redhat.com>
> Date: 13 Nov 2004 22:28:38 -0700
> 
> Java defines \r, \r\n, and \n as valid line endings.  I've seen actual
> java source files in the wild that mix two of the three (and maybe all
> three, I forget).

What does Java do when it sees \r\n -- does that count as one line or
two?  (I assume there are some utilities in the JDK that number
lines.)  What does the Java compiler do in that case wrt line numbers?

This is important for GDB because we need to count lines exactly like
the compiler does.  If we support sole \r even in mixed EOL-format
files, then it is not clear what to do with the \r\n case: is it a
single DOS-style line or one Mac-style and one Unix-style line?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]