From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1237 invoked by alias); 14 Nov 2004 20:41:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1200 invoked from network); 14 Nov 2004 20:40:59 -0000 Received: from unknown (HELO balder.inter.net.il) (192.114.186.15) by sourceware.org with SMTP; 14 Nov 2004 20:40:59 -0000 Received: from zaretski ([80.230.158.116]) by balder.inter.net.il (Mirapoint Messaging Server MOS 3.3.7-GR) with ESMTP id DWD19072 (AUTH halo1); Sun, 14 Nov 2004 22:39:39 +0200 (IST) Date: Sun, 14 Nov 2004 21:43:00 -0000 From: "Eli Zaretskii" To: tromey@redhat.com Message-ID: <01c4ca89$Blat.v2.2.2$e9842b60@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: drow@false.org, otto.wyss@orpatec.ch, gdb@sources.redhat.com In-reply-to: (message from Tom Tromey on 13 Nov 2004 22:28:38 -0700) Subject: Re: GDB doesn't show the correct line Reply-to: Eli Zaretskii References: <40D5E480.4A68163@orpatec.ch> <20040620202929.GA17216@nevyn.them.org> <40D7212F.E68A9D61@orpatec.ch> <20040621175928.GA13407@nevyn.them.org> <40D725AF.FC2AAF3A@orpatec.ch> <20041113201803.GA21320@nevyn.them.org> <01c4c9c9$Blat.v2.2.2$913fbf20@zahav.net.il> <20041113214612.GA30909@nevyn.them.org> X-SW-Source: 2004-11/txt/msg00137.txt.bz2 > Cc: otto.wyss@orpatec.ch, gdb@sources.redhat.com > From: Tom Tromey > 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?