This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Build question
- From: Danny Backx <danny dot backx at scarlet dot be>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: tromey at redhat dot com, gdb at sourceware dot org
- Date: Tue, 01 Sep 2009 20:04:55 +0200
- Subject: Re: Build question
- References: <1250803105.11282.96.camel@pavilion> <m3fxbl2jib.fsf@fleche.redhat.com> <83d46pgjkq.fsf@gnu.org> <1250877901.11282.116.camel@pavilion> <83ab1tgh9h.fsf@gnu.org> <1250880746.11282.128.camel@pavilion> <m3r5v425lu.fsf@fleche.redhat.com> <1250931899.11282.142.camel@pavilion> <83skfkfa4n.fsf@gnu.org> <1251095160.16357.352.camel@pavilion>
- Reply-to: danny dot backx at scarlet dot be
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