From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6799 invoked by alias); 6 Apr 2006 04:29:20 -0000 Received: (qmail 6784 invoked by uid 22791); 6 Apr 2006 04:29:18 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 06 Apr 2006 04:29:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FRM7O-0004J4-0q; Thu, 06 Apr 2006 00:29:14 -0400 Date: Thu, 06 Apr 2006 04:29:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org, gdb@sources.redhat.com Subject: Re: text file formats Message-ID: <20060406042913.GA16513@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org, gdb@sources.redhat.com References: <20060405223122.GB11610@brasko.net> <20060405233938.GA11013@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00050.txt.bz2 On Thu, Apr 06, 2006 at 06:47:42AM +0300, Eli Zaretskii wrote: > > Well, usually. In search and reverse search it sometimes uses a > > similar but slightly simpler algorithm: ignore '\r' if followed by > > '\n'. I'm not sure why those are done in binary mode. > > I think it's because GDB counts characters and then lseeks to the > point it thinks it should display. If the library's text-mode I/O > converts \r\n to \n, this seeks will only work reliably in binary > mode, since most DOS/Windows libraries don't seek to the correct place > (the only exception from this rule I know of is the DJGPP library). Oh, thanks. That's surely it. -- Daniel Jacobowitz CodeSourcery From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6800 invoked by alias); 6 Apr 2006 04:29:21 -0000 Received: (qmail 6783 invoked by uid 22791); 6 Apr 2006 04:29:17 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 06 Apr 2006 04:29:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FRM7O-0004J4-0q; Thu, 06 Apr 2006 00:29:14 -0400 Date: Thu, 06 Apr 2006 04:30:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org, gdb@sources.redhat.com Subject: Re: text file formats Message-ID: <20060406042913.GA16513@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org, gdb@sources.redhat.com References: <20060405223122.GB11610@brasko.net> <20060405233938.GA11013@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00051.txt.bz2 Message-ID: <20060406043000.LP2uvHAJTDDCYvgU0-vg92j9O_md4gOBvqAhNnIeTF8@z> On Thu, Apr 06, 2006 at 06:47:42AM +0300, Eli Zaretskii wrote: > > Well, usually. In search and reverse search it sometimes uses a > > similar but slightly simpler algorithm: ignore '\r' if followed by > > '\n'. I'm not sure why those are done in binary mode. > > I think it's because GDB counts characters and then lseeks to the > point it thinks it should display. If the library's text-mode I/O > converts \r\n to \n, this seeks will only work reliably in binary > mode, since most DOS/Windows libraries don't seek to the correct place > (the only exception from this rule I know of is the DJGPP library). Oh, thanks. That's surely it. -- Daniel Jacobowitz CodeSourcery