From: Eli Zaretskii <eliz@is.elta.co.il>
To: Keith Seitz <keiths@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] defs.h _WIN32 defined by Win98, too
Date: Wed, 01 Aug 2001 08:23:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1010801181546.18547B-100000@is> (raw)
In-Reply-To: <Pine.GSO.4.33.0108010742001.26158-100000@makita.cygnus.com>
On Wed, 1 Aug 2001, Keith Seitz wrote:
> > > `/home/keiths/sources/insight/gdb\gdb.exe' has disappeared; keeping its
> > > symbols.
> > >
> > > Starting program: /home/keiths/sources/insight/gdb\gdb.exe
> > > Error creating process /home/keiths/sources/insight/gdb\gdb.exe (error 2)
> > > [often crashes here]
> > >
> > > Apparently, Win98 defines _WIN32 somewhere...
> >
> > So perhaps there's a bug in Cygwin ;-)
>
> Nope. Works fine on Win2000 using EXACTLY the same environment.
So you are saying that the same version of Cygwin defines _WIN32 on
Windows 98, but not on W2K? isn't that strange?
> > Anyway, didn't Chris say that _WIN32 should be removed from GDB
> > everywhere? If that's so, the ifdef _WIN32 should be simply deleted,
> > instead of lumping more ifdefs on top of it. For SLASH_STRING in
> > particular, this shouldn't be a problem at all, since Windows supports
> > forward slashes as well as backslashes, even if GDB is built with MS
> > run-time DLLs.
>
> Windows does NOT support both forward and backward slashes in this
> context. Or perhaps more correctly, cygwin does not support both.
My analysis of the problem is different; it goes like this:
- somehow, _WIN32 got defined on Windows 98;
- because _WIN32 is defined, GDB is compiled so as to use the
backslash as a directory separator in file names;
- GDB then constructs file names with a backslash, and gets
/home/keiths/sources/insight/gdb\gdb.exe instead of the normal
/home/keiths/sources/insight/gdb/gdb.exe (see the file source.c);
- the backslash confuses Cygwin library functions which manipulate file
names, probably because it doesn't grok backslashes.
> I don't
> know (and frankly don't care) who is to blame. Gdb doesn't work on Win98.
I don't argue with facts; it's clear that something breaks GDB. But I
think we need to understand why does _WIN32 get defined on some systems,
but not on others.
> As for eliminating SLASH_STRING, well, that's a much bigger and riskier
> change than the simple, pragmatic approach I've taken.
I didn't say eliminate SLASH_STRING, I said eliminate _WIN32. That is,
make SLASH_STRING always be "/", but don't replace it with a literal "/".
next prev parent reply other threads:[~2001-08-01 8:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.GSO.4.33.0107311445130.28966-100000@makita.cygnus.com>
2001-08-01 1:49 ` Eli Zaretskii
2001-08-01 7:48 ` Keith Seitz
2001-08-01 8:23 ` Eli Zaretskii [this message]
2001-08-01 8:32 ` Keith Seitz
2001-08-01 8:39 ` Eli Zaretskii
2001-08-02 13:40 ` Christopher Faylor
2001-08-02 13:57 ` Keith Seitz
2001-08-02 14:11 ` Andrew Cagney
2001-08-02 14:37 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1010801181546.18547B-100000@is \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=keiths@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox