From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29924 invoked by alias); 14 Sep 2002 00:57:59 -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 29917 invoked from network); 14 Sep 2002 00:57:57 -0000 Received: from unknown (HELO msgbas1.cos.agilent.com) (192.25.240.36) by sources.redhat.com with SMTP; 14 Sep 2002 00:57:57 -0000 Received: from relcos1.cos.agilent.com (relcos1.cos.agilent.com [130.29.152.239]) by msgbas1.cos.agilent.com (Postfix) with ESMTP id 53E27BEC0 for ; Fri, 13 Sep 2002 18:57:47 -0600 (MDT) Received: from websvr.canada.agilent.com (websvr.canada.agilent.com [141.184.122.102]) by relcos1.cos.agilent.com (Postfix) with ESMTP id CC2BC369 for ; Fri, 13 Sep 2002 18:57:19 -0600 (MDT) Received: from agilent.com (dhcp6burnaby.canada.agilent.com [141.184.123.147]) by websvr.canada.agilent.com (8.9.3 (PHNE_25183)/8.9.3 SMKit7.1.1_Agilent) with ESMTP id RAA19800 for ; Fri, 13 Sep 2002 17:57:36 -0700 (PDT) Message-ID: <3D82897C.81376AD6@agilent.com> Date: Fri, 13 Sep 2002 17:57:00 -0000 From: Earl Chew Organization: Agilent Technologies X-Accept-Language: en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Finding source files under Cygwin Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00287.txt.bz2 I have object files compiled that have directory names such as: D:/xxx/yyy/zzz embedded in them. In source.c, open_source_file() tries to use this information to locate the source files. Unfortunately, it gets confused because the directory gets substituted for $cdir, and the embedded colon confuses openp() which considers two separate path components: D and /xxx/yyy/zzz. One fix I can think of is to fix open_source_file() using #ifdef __CYGWIN__ to silently subsitute /cygdrive/d/xxx/yyy/zzz instead. A variation on this is to make the fix in buildsym.c instead (ie store the corrected version of the directory instead of patching it later). I don't think this is the best way to go. 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. A variation is to have open_source_file() build a new path string, replacing : with ; (under HAVE_DOS_BASED_FILE_SYSTEM), and have openp deal with ;. Thus the user interface sees : -- but internally openp breaks up the path at ;. Sigh. Earl