From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32353 invoked by alias); 13 Nov 2004 20:50:10 -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 32340 invoked from network); 13 Nov 2004 20:50:05 -0000 Received: from unknown (HELO mail.xor.ch) (212.55.210.163) by sourceware.org with SMTP; 13 Nov 2004 20:50:05 -0000 Received: from orpatec.ch (80.218.107.22) by mail.xor.ch with MERCUR Mailserver (v4.03.11 NjYtMjMxMS00NjIy) for ; Sat, 13 Nov 2004 21:56:27 +0100 Message-ID: <41967379.F2BD27D2@orpatec.ch> Date: Sat, 13 Nov 2004 20:55:00 -0000 From: Otto Wyss MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Re: GDB doesn't show the correct line 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00128.txt.bz2 Daniel Jacobowitz wrote: > > On Mon, Jun 21, 2004 at 08:15:10PM +0200, Otto Wyss wrote: > > Daniel Jacobowitz wrote: > > > > > Can't this line number problem somehow detected within GDB? Sorry if I > > ask this as someone without knowing any internals but IMO this would be > > the best solution. My app is now working so I'm not in a hurry but a > > good debugger is _essential_ for any development. > > It's no one's fault, I think. I tracked down the problem. You have > mixed newline conventions in the file: mostly "\n" as a line separator, > but in some places just "\r". GCC treats this as a line break for > legacy reasons (MacOS). 'less' doesn't, which really confused me while > trying to debug the problem. GDB doesn't, either. > > Should GDB? I have no idea. But it's easiest to just fix the source > file to be consistent. > Of course I check all my sources but I fear it's in some header file (most probably wxWidgets). I've never edited any of my sources on the Mac. IMO it would be best if GDB would handle line separators equally as GCC. So the behaviour would be consistent an easier understandable by the user. O. Wyss -- Development of frame buffer drivers: http://linux-fbdev.sf.net Sample code snippets for wxWidgets: http://wxcode.sf.net How to build well-designed applications: http://wxguide.sf.net Desktop with a consistent look and feel: http://wyodesktop.sf.net