DOS/Windows-specific code: main.c
Keith Seitz
keiths@cygnus.com
Tue May 8 08:17:00 GMT 2001
On Tue, 8 May 2001, Christopher Faylor wrote:
> >If so, why is that needed? Doesn't Cygwin support the native Windows
> >file names with drive letters?
>
> Actually CYGWIN converts the HOME environment variable to "posix" format
> well before the code ever reaches here. I believe that this code is
> to accomodate gdbtk which might change the environment variable back
> to MS-DOS format explicitly. I remember trying to get rid of this
> years ago. Keith Seitz told me that I couldn't do that.
As I recall, HOME used to be set to a windows stye path. We certainly do
not set HOME anywhere. In fact, I see that in several places in gdbtk, we
*explicitly* convert HOME to cygwin/posix path from Windows-style path.
> Or, maybe this isn't needed anymore. Keith do you remember this? I
> think it may have been the first piece of email we ever exchanged.
We also used to get NULL from getenv when you do not start it up from a
shell (i.e, you double-click the icon). Perhaps all of this has changed
(for the better) now. I don't think this was gdbtk-specific. It was a
problem looking for gdb.ini on windows.
If cygwin dll _always_ sets HOME (as you imply), then we should be able to
just get rid of all of this. Just need to verify that ~/gdb.ini is found
and loaded on windows (both with a shell and without).
Keith
More information about the Gdb
mailing list