This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code: exec.c and symfile.c
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: DOS/Windows-specific code: exec.c and symfile.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Wed, 9 May 2001 13:05:49 +0300 (IDT)
- cc: gdb at sources dot redhat dot com
On Tue, 8 May 2001, Andrew Cagney wrote:
> > This snippet wants to find `foo.exe' when `foo' is being specified.
> > Should we add a #define for executable extensions (defaulting to an
> > empty string on Unix)?
>
> Hmm, the makefile already knows about EXEEXT.
So how about adding `-DEXE_EXT=\"EXEEXT\"' to DEFS, and then testing
EXE_EXT in the sources?
Alternatively, we could modify openp to always accept an additional
parameter, which is an optional extension (or even a list of possible
extensions), and if it's non-empty, try those extensions in addition
to the original file name. (That's what openp in Emacs does, btw.)