This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]