This is the mail archive of the gdb-patches@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: '\r' only end-of-line




Eli Zaretskii wrote:

Date: Tue, 10 Oct 2006 17:08:23 +0200
From: Denis PILAT <denis.pilat@st.com>
Cc: Eli Zaretskii <eliz@gnu.org>

As discussed in thread http://sources.redhat.com/ml/gdb-patches/2006-10/msg00090.html
about the TUI that did not display windows source files,


I propose a patch that treats source files where end-of-line are '\r' only.


I think part of your patch is not needed: the Windows port of GDB should use the LSEEK_NOT_LINEAR branch of the code in find_source_lines, so the code you are patching doesn't need to consider the \r\n case.

Yes but when you use a linux hosted compiler for reading windows source file
(sorry for that weirdness but we sometime have common source file for both OS),
then this case may happen.




As for the \r case, don't such files fail in many more places?  It
looks like you need to test for \r in every place where we currently
test for \n, or am I missing something?


Well, I thought reading your previous email on the other patch you just accepted
( "What happens with a file that ends in a sole `\r'?"),
that MacOs files were supported by GDB. So I did some tests
with such a file and found that there were a problem in the TUI that
did not allow user to scroll these kind of source files. There are also
problem in gdb command line. Both tell that the source file contains only 1 line.


My patch just fixes this problem and allow scrolling of sources file in the TUI, not more.

It does NOT aims at globally supporting MACOS files , as you said, there should
be plenty of failures elsewhere, and there are.
I don't want to go into such a yard
so let's forget about my patch if you think it's useless.


Denis





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