From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31462 invoked by alias); 16 Sep 2002 19:48:44 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31454 invoked from network); 16 Sep 2002 19:48:43 -0000 Received: from unknown (HELO redhat.com) (66.30.22.225) by sources.redhat.com with SMTP; 16 Sep 2002 19:48:43 -0000 Received: by redhat.com (Postfix, from userid 201) id 171821B95E; Mon, 16 Sep 2002 15:48:35 -0400 (EDT) Date: Mon, 16 Sep 2002 12:48:00 -0000 From: Christopher Faylor To: gdb-patches@sources.redhat.com Subject: Re: Finding source files under cygwin Message-ID: <20020916194835.GC2600@redhat.com> Mail-Followup-To: gdb-patches@sources.redhat.com References: <3D82897C.81376AD6@agilent.com> <3D862BD0.A5298600@agilent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D862BD0.A5298600@agilent.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-09/txt/msg00316.txt.bz2 On Mon, Sep 16, 2002 at 12:06:56PM -0700, Earl Chew wrote: >Christopher Faylor wrote: >> >Another fix is to make source.c use ; (semicolon) as a path >> >separator instead of : (colon) should HAVE_DOS_BASED_FILE_SYSTEM >> >be true. The downside here is that it might be surprising >> >to current cygwin users. >> >> This one is out. This would break backwards compatibility and would be >> incompatible with the convention used in the rest of cygwin. >> >> The simplest solution is to just compile your object files using >> the /cygdrive/d/xxx/yyy/zzz syntax. The ability to use this syntax >> is one of the motivations for cygwin. >> >> However, if you want to provide a patch for either open_source_file >> or buildsym.c, I'll gladly review it. > >I've included a patch below for you to consider. In addition to >robustly handling the presence of DIRNAME_SEPARATOR in the file >names embedded in the object file, I've included a patch to allow >files to be found in source trees. > >The motivation for this addition is to accommodate large projects >where source files are scattered in large source trees. I want to >be able to point gdb at the root of the source tree, rather than have >to specify each leaf directory. Thus I can write: > > gdb> dir /myproject/source > >instead of: > > gdb> dir /myproject/source/a/b/c:/myproject/source/z/b/d: etc I'm sorry but it is rarely a good idea to mix functionality like this. You're mixing an (arguable) bug fix with an (arguable) gdb enhancement. Please submit each as a separate patch. cgf