From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29768 invoked by alias); 11 Oct 2006 10:08:40 -0000 Received: (qmail 29757 invoked by uid 22791); 11 Oct 2006 10:08:37 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-01.spheriq.net (HELO fra-del-01.spheriq.net) (195.46.51.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Oct 2006 10:08:30 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-01.spheriq.net with ESMTP id k9BA8IaJ006556 for ; Wed, 11 Oct 2006 10:08:18 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-02.spheriq.net with ESMTP id k9BA8DSx019400 for ; Wed, 11 Oct 2006 10:08:18 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id k9BA8APf013998 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 11 Oct 2006 10:08:12 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2CFF6DA49; Wed, 11 Oct 2006 10:08:10 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B98B7472DC; Wed, 11 Oct 2006 10:08:09 +0000 (GMT) Received: from st.com (crx1177.cro.st.com [164.129.47.77]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CIQ88353 (AUTH "denis pilat"); Wed, 11 Oct 2006 12:08:08 +0200 (CEST) Message-ID: <452CC287.4050401@st.com> Date: Wed, 11 Oct 2006 10:08:00 -0000 From: Denis PILAT User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: '\r' only end-of-line References: <452A6905.1040308@st.com> <452B9EB9.4040709@st.com> <452BB767.5000407@st.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00102.txt.bz2 Eli Zaretskii wrote: >>Date: Tue, 10 Oct 2006 17:08:23 +0200 >>From: Denis PILAT >>Cc: Eli Zaretskii >> >>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