This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code: main.c
On Tue, May 08, 2001 at 08:16:20AM -0700, Keith Seitz wrote:
>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).
The DLL doesn't always set HOME. I think it always expects it to be
inherited from the environment. We could change this, thouhh, now that
I think of it.
So, it sounds like this code isn't needed. I'll try deleting it and
building a cygwin version of gdb.
cgf