This is the mail archive of the gdb@sourceware.org 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: text file formats


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


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