Re: text file formats

Daniel Jacobowitz
2006-04-06T14:05:47Z

On Thu, Apr 06, 2006 at 09:38:29AM -0400, Bob Rossi wrote:
> OK, this is interesting in brings up 2 cases. (They may be the same
> though).

Why are you going to tremendous lengths to accomodate non-native
newline conventions? Is there some good reason I've missed? Your
example about the slightly mangled RHEL3 header doesn't cut it. That's
the least problematic form of mixing. You'll just get stray
non-printables at the end of lines.

You can go to all the trouble you want, but the fact is, GDB only
supports files using the native convention. So no wonder you can't
get it to match. If you really need anything more, I recommend just
detecting the case and warning.

> GDB writes every line to the current line when listing the mac file.
> It is overwritten via the "\r". Notice that the 'info source' command
> thinks the file is 1 line long. This isn't correct IMO. Is it to anyone
> else?

That is a correct interpretation of a file containing only '\r' line
separators on a Unix platform.

> Breakpoint 3, macf (i=1) at mac.c:4
> Line number 4 out of range; mac.c has 1 lines.

That is GCC's interpretation of a file containing only '\r' separators
on a Unix platform. It is also valid.

--
Daniel Jacobowitz
CodeSourcery