From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6689 invoked by alias); 1 Sep 2009 18:03:29 -0000 Received: (qmail 6632 invoked by uid 22791); 1 Sep 2009 18:03:27 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_55,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hel.is.scarlet.be (HELO hel.is.scarlet.be) (193.74.71.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 18:03:21 +0000 Received: from [172.17.1.10] (ip-81-11-243-185.dsl.scarlet.be [81.11.243.185]) by hel.is.scarlet.be (8.14.2/8.14.2) with ESMTP id n81I2thM007331; Tue, 1 Sep 2009 20:02:55 +0200 Subject: Re: Build question From: Danny Backx Reply-To: danny.backx@scarlet.be To: Eli Zaretskii Cc: tromey@redhat.com, gdb@sourceware.org In-Reply-To: <1251095160.16357.352.camel@pavilion> References: <1250803105.11282.96.camel@pavilion> <83d46pgjkq.fsf@gnu.org> <1250877901.11282.116.camel@pavilion> <83ab1tgh9h.fsf@gnu.org> <1250880746.11282.128.camel@pavilion> <1250931899.11282.142.camel@pavilion> <83skfkfa4n.fsf@gnu.org> <1251095160.16357.352.camel@pavilion> Content-Type: text/plain Date: Tue, 01 Sep 2009 18:03:00 -0000 Message-Id: <1251828295.6106.119.camel@pavilion> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-DCC-scarlet.be-Metrics: hel 20001; Body=4 Fuz1=4 Fuz2=4 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00005.txt.bz2 On Mon, 2009-08-24 at 08:26 +0200, Danny Backx wrote: > On Sat, 2009-08-22 at 12:52 +0300, Eli Zaretskii wrote: > > Can you point out the places in the code (hopefully, not too many) > > where the Posix assumption about file-name syntax needs to be replaced > > with the Windows assumption? > > > > If there are not too many of them, we could modify them to use one or > > two user options. For starters, these options would need to be set > > manually, by the user who knows what filesystem she is working with. > > Later, we could try to set them automatically. > > I'll try this. I did a bit of research. Getting most things I care about to work is done by simplifying include/filenames.h so it unconditionally takes the DOS versions of IS_DIR_SEPARATOR() and IS_ABSOLUTE_PATH(). I also manually hacked libiberty/config.h in my build directory to define HAVE_DOS_BASED_FILE_SYSTEM. A quick test (yeah I know, this proves very little) shows that the case I am after (to get DLL functionality to work) gets fixed with the include/filenames.h change, even without the libiberty/config.h hack. Apart from that, HAVE_DOS_BASED_FILE_SYSTEM is used in a number of sources (even though filenames.h appears to do much already) : ./libiberty/make-relative-prefix.c ./libiberty/basename.c ./libiberty/lbasename.c ./include/filenames.h ./bfd/archive.c ./gdb/utils.c ./gdb/cli/cli-cmds.c ./gdb/completer.c ./gdb/symtab.c ./gdb/source.c Quick analysis : The code in bfd/archive.c could probably be cleaned up based on IS_DIR_SEPARATOR. The code in gdb/utils.c could just always be compiled in. Same, I think, for gdb/cli/cli-cmds.c. One part of gdb/completer.c is file name break characters. Not sure how to deal with those. The other #if is no problem. The stuff in gdb/symtab.c does case independent string compare in the DOS case. gdb/source.c looks safe too. My gut feeling is to just do the simplification, and add a variable that says what to do with case insensitive file names. Don't know what to do with the file name break characters. But I may be oversimplifying matters. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info