* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW [not found] <JLEAKDMELBINENLADICFIEFHCIAA.fischermi@t-online.de> @ 2006-06-18 3:24 ` Eli Zaretskii 2006-06-18 4:56 ` Masaki Muranaka 0 siblings, 1 reply; 15+ messages in thread From: Eli Zaretskii @ 2006-06-18 3:24 UTC (permalink / raw) To: Michael Fischer; +Cc: gdb-patches [Please don't take this discussion off the mailing list.] > From: "Michael Fischer" <fischermi@t-online.de> > Date: Sat, 17 Jun 2006 23:32:25 +0200 > > Why ":" and not ";" ? > > If I compile the GDB under MinGW, DIRNAME_SEPARATOR was set to ":". > If you take a look in gdb\defs.h, ";" is only defined in case of > __MSDOS__. I think MinGW will not set this define?! What happens if you modify defs.h to define DIRNAME_SEPARATOR as `;'? Does the problem go away? > I think in this case, we should change the add_path function too. I think if DIRNAME_SEPARATOR is `;', add_path will do what you need. Could you please check that? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 3:24 ` AW: [PATCH] source.s: Fix problem handling windows like path with MinGW Eli Zaretskii @ 2006-06-18 4:56 ` Masaki Muranaka 2006-06-18 9:03 ` AW: " Michael Fischer 2006-06-18 19:47 ` Eli Zaretskii 0 siblings, 2 replies; 15+ messages in thread From: Masaki Muranaka @ 2006-06-18 4:56 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Michael Fischer, gdb-patches On 2006/06/18, at 12:23, Eli Zaretskii wrote: > [Please don't take this discussion off the mailing list.] > >> From: "Michael Fischer" <fischermi@t-online.de> >> Date: Sat, 17 Jun 2006 23:32:25 +0200 >> >> Why ":" and not ";" ? >> >> If I compile the GDB under MinGW, DIRNAME_SEPARATOR was set to ":". >> If you take a look in gdb\defs.h, ";" is only defined in case of >> __MSDOS__. I think MinGW will not set this define?! > > What happens if you modify defs.h to define DIRNAME_SEPARATOR as `;'? > Does the problem go away? > >> I think in this case, we should change the add_path function too. > > I think if DIRNAME_SEPARATOR is `;', add_path will do what you need. > > Could you please check that? BTW, Why do we use DIRNAME_SEPARATOR, instead of PATH_SEPARATOR ? As PATH_SEPARATOR is detected by configure, it is trustable. I think they will be same value on self builds, right? Also we can choice to modify xm-.h on cross builds. -- Masaki Muranaka Monami software ^ permalink raw reply [flat|nested] 15+ messages in thread
* AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 4:56 ` Masaki Muranaka @ 2006-06-18 9:03 ` Michael Fischer 2006-06-18 19:47 ` Eli Zaretskii 2006-06-18 19:47 ` Eli Zaretskii 1 sibling, 1 reply; 15+ messages in thread From: Michael Fischer @ 2006-06-18 9:03 UTC (permalink / raw) To: gdb-patches I have make a quick test and added: #undef DIRNAME_SEPARATOR #define DIRNAME_SEPARATOR ';' after all includes in source.c This is working now! I think we should change defs.h from: #ifdef __MSDOS__ # define CANT_FORK # define GLOBAL_CURDIR # define DIRNAME_SEPARATOR ';' #endif #ifndef DIRNAME_SEPARATOR #define DIRNAME_SEPARATOR ':' #endif to: #ifdef __MSDOS__ #define CANT_FORK #define GLOBAL_CURDIR #endif #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__) #define DIRNAME_SEPARATOR ';' #endif #ifndef DIRNAME_SEPARATOR #define DIRNAME_SEPARATOR ':' #endif But I do not know if this will breaks the other one. I saw this define construct will be used in filenames to. Michael -----Ursprungliche Nachricht----- Von: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org]Im Auftrag von Masaki Muranaka Gesendet: Sonntag, 18. Juni 2006 06:57 An: Eli Zaretskii Cc: Michael Fischer; gdb-patches@sourceware.org Betreff: Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW On 2006/06/18, at 12:23, Eli Zaretskii wrote: > [Please don't take this discussion off the mailing list.] > >> From: "Michael Fischer" <fischermi@t-online.de> >> Date: Sat, 17 Jun 2006 23:32:25 +0200 >> >> Why ":" and not ";" ? >> >> If I compile the GDB under MinGW, DIRNAME_SEPARATOR was set to ":". >> If you take a look in gdb\defs.h, ";" is only defined in case of >> __MSDOS__. I think MinGW will not set this define?! > > What happens if you modify defs.h to define DIRNAME_SEPARATOR as `;'? > Does the problem go away? > >> I think in this case, we should change the add_path function too. > > I think if DIRNAME_SEPARATOR is `;', add_path will do what you need. > > Could you please check that? BTW, Why do we use DIRNAME_SEPARATOR, instead of PATH_SEPARATOR ? As PATH_SEPARATOR is detected by configure, it is trustable. I think they will be same value on self builds, right? Also we can choice to modify xm-.h on cross builds. -- Masaki Muranaka Monami software ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 9:03 ` AW: " Michael Fischer @ 2006-06-18 19:47 ` Eli Zaretskii 2006-06-18 20:05 ` AW: " Michael Fischer 2006-06-18 20:15 ` Christopher Faylor 0 siblings, 2 replies; 15+ messages in thread From: Eli Zaretskii @ 2006-06-18 19:47 UTC (permalink / raw) To: Michael Fischer; +Cc: gdb-patches > From: "Michael Fischer" <fischermi@t-online.de> > Date: Sun, 18 Jun 2006 11:03:43 +0200 > > I have make a quick test and added: > > #undef DIRNAME_SEPARATOR > #define DIRNAME_SEPARATOR ';' > > after all includes in source.c > > This is working now! Thank you for testing. > #ifdef __MSDOS__ > #define CANT_FORK > #define GLOBAL_CURDIR > #endif > > #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined > (__CYGWIN__) > #define DIRNAME_SEPARATOR ';' > #endif I think __CYGWIN__ should not be here. In fact, even _WIN32 should not trigger use of `;' unless __CYGWIN__ is not defined. Chris, is that right? Does anyone object to adding something like the above, provided that we are careful not to break Cygwin? ^ permalink raw reply [flat|nested] 15+ messages in thread
* AW: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 19:47 ` Eli Zaretskii @ 2006-06-18 20:05 ` Michael Fischer 2006-06-18 20:16 ` Christopher Faylor 2006-06-18 20:15 ` Christopher Faylor 1 sibling, 1 reply; 15+ messages in thread From: Michael Fischer @ 2006-06-18 20:05 UTC (permalink / raw) To: gdb-patches >> #ifdef __MSDOS__ >> #define CANT_FORK >> #define GLOBAL_CURDIR >> #endif >> >> #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined >> (__CYGWIN__) >> #define DIRNAME_SEPARATOR ';' >> #endif > >I think __CYGWIN__ should not be here. In fact, even _WIN32 should >not trigger use of `;' unless __CYGWIN__ is not defined. Chris, is >that right? > >Does anyone object to adding something like the above, provided that >we are careful not to break Cygwin? To make sure that we does not break Cygwin, perhaps we can use the following check: #if defined(__MSDOS__) || defined (__MINGW32__) #define DIRNAME_SEPARATOR ';' #endif Only check for __MSDOS__ and __MINGW32__ in this case Cygwin could not be affected. Regards, Michael ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 20:05 ` AW: " Michael Fischer @ 2006-06-18 20:16 ` Christopher Faylor 0 siblings, 0 replies; 15+ messages in thread From: Christopher Faylor @ 2006-06-18 20:16 UTC (permalink / raw) To: gdb-patches, Michael Fischer On Sun, Jun 18, 2006 at 10:05:30PM +0200, Michael Fischer wrote: >>> #ifdef __MSDOS__ >>> #define CANT_FORK >>> #define GLOBAL_CURDIR >>> #endif >>> >>> #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined >>> (__CYGWIN__) >>> #define DIRNAME_SEPARATOR ';' >>> #endif >> >>I think __CYGWIN__ should not be here. In fact, even _WIN32 should >>not trigger use of `;' unless __CYGWIN__ is not defined. Chris, is >>that right? >> >>Does anyone object to adding something like the above, provided that >>we are careful not to break Cygwin? > >To make sure that we does not break Cygwin, perhaps we can use the following >check: > >#if defined(__MSDOS__) || defined (__MINGW32__) >#define DIRNAME_SEPARATOR ';' >#endif > >Only check for __MSDOS__ and __MINGW32__ in this case Cygwin >could not be affected. I think you might as well check for _WIN32 directly since there's no need to put a barrier in the code to using a Microsoft compiler at some point. cgf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 19:47 ` Eli Zaretskii 2006-06-18 20:05 ` AW: " Michael Fischer @ 2006-06-18 20:15 ` Christopher Faylor 2006-06-19 3:22 ` Eli Zaretskii 1 sibling, 1 reply; 15+ messages in thread From: Christopher Faylor @ 2006-06-18 20:15 UTC (permalink / raw) To: Michael Fischer, gdb-patches On Sun, Jun 18, 2006 at 10:46:55PM +0300, Eli Zaretskii wrote: >> From: "Michael Fischer" <fischermi@t-online.de> >> Date: Sun, 18 Jun 2006 11:03:43 +0200 >> >> I have make a quick test and added: >> >> #undef DIRNAME_SEPARATOR >> #define DIRNAME_SEPARATOR ';' >> >> after all includes in source.c >> >> This is working now! > >Thank you for testing. > >> #ifdef __MSDOS__ >> #define CANT_FORK >> #define GLOBAL_CURDIR >> #endif >> >> #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined >> (__CYGWIN__) >> #define DIRNAME_SEPARATOR ';' >> #endif > >I think __CYGWIN__ should not be here. In fact, even _WIN32 should >not trigger use of `;' unless __CYGWIN__ is not defined. Chris, is >that right? > >Does anyone object to adding something like the above, provided that >we are careful not to break Cygwin? Yes, that's right. So, it should be: #if defined(__MSDOS__) || (!defined (__CYGWIN__) && defined (_WIN32)) No objections from me on adding this. I'm surprised that there isn't something like that already in place. cgf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 20:15 ` Christopher Faylor @ 2006-06-19 3:22 ` Eli Zaretskii 2006-06-20 20:27 ` Daniel Jacobowitz 0 siblings, 1 reply; 15+ messages in thread From: Eli Zaretskii @ 2006-06-19 3:22 UTC (permalink / raw) To: Michael Fischer, gdb-patches > Date: Sun, 18 Jun 2006 16:15:51 -0400 > From: Christopher Faylor <me@cgf.cx> > > Yes, that's right. So, it should be: > > #if defined(__MSDOS__) || (!defined (__CYGWIN__) && defined (_WIN32)) Agreed. > I'm surprised that there isn't something like that already in place. Me too. Can someone who routinely builds MinGW ports (Daniel?) please comment? How do you get GDB to DTRT without defining DIRNAME_SEPARATOR to be `;'? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-19 3:22 ` Eli Zaretskii @ 2006-06-20 20:27 ` Daniel Jacobowitz 2006-06-24 13:51 ` Eli Zaretskii 0 siblings, 1 reply; 15+ messages in thread From: Daniel Jacobowitz @ 2006-06-20 20:27 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Michael Fischer, gdb-patches On Mon, Jun 19, 2006 at 06:22:26AM +0300, Eli Zaretskii wrote: > > Date: Sun, 18 Jun 2006 16:15:51 -0400 > > From: Christopher Faylor <me@cgf.cx> > > > > Yes, that's right. So, it should be: > > > > #if defined(__MSDOS__) || (!defined (__CYGWIN__) && defined (_WIN32)) > > Agreed. > > > I'm surprised that there isn't something like that already in place. > > Me too. Can someone who routinely builds MinGW ports (Daniel?) please > comment? How do you get GDB to DTRT without defining DIRNAME_SEPARATOR > to be `;'? I have no idea; presumably it doesn't. We've got only limited test coverage on our native Windows GDB (lack of expect makes everything much harder). Personally, I'd grab the #define from libiberty/make-relative-prefix.c, and maybe even move it into include/filenames.h. That one's better tested. But it uses ';' if _WIN32, so don't ask me how that works for Cygwin builds. Maybe it doesn't. I'm fine with Chris's suggested definition, naturally. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-20 20:27 ` Daniel Jacobowitz @ 2006-06-24 13:51 ` Eli Zaretskii 0 siblings, 0 replies; 15+ messages in thread From: Eli Zaretskii @ 2006-06-24 13:51 UTC (permalink / raw) To: Michael Fischer, gdb-patches > Date: Tue, 20 Jun 2006 16:27:42 -0400 > From: Daniel Jacobowitz <drow@false.org> > Cc: Michael Fischer <fischermi@t-online.de>, gdb-patches@sourceware.org > > Personally, I'd grab the #define from libiberty/make-relative-prefix.c, > and maybe even move it into include/filenames.h. That one's better > tested. But it uses ';' if _WIN32, so don't ask me how that works for > Cygwin builds. Maybe it doesn't. > > I'm fine with Chris's suggested definition, naturally. Thanks to you and Chris for all the feedback. I eventually opted for the change in defs.h, to avoid the risk of breaking something else that uses include/filenames.h. Here's what I actually committed: 2006-06-24 Eli Zaretskii <eliz@gnu.org> * defs.h (DIRNAME_SEPARATOR) [!__CYGWIN__ && _WIN32]: Define to `;'. Index: gdb/defs.h =================================================================== RCS file: /cvs/src/src/gdb/defs.h,v retrieving revision 1.194 diff -u -r1.194 defs.h --- gdb/defs.h 25 Feb 2006 04:36:39 -0000 1.194 +++ gdb/defs.h 24 Jun 2006 13:47:43 -0000 @@ -1163,6 +1163,10 @@ # define DIRNAME_SEPARATOR ';' #endif +#if !defined (__CYGWIN__) && defined (_WIN32) +# define DIRNAME_SEPARATOR ';' +#endif + #ifndef DIRNAME_SEPARATOR #define DIRNAME_SEPARATOR ':' #endif ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 4:56 ` Masaki Muranaka 2006-06-18 9:03 ` AW: " Michael Fischer @ 2006-06-18 19:47 ` Eli Zaretskii 2006-06-19 0:27 ` Masaki Muranaka 1 sibling, 1 reply; 15+ messages in thread From: Eli Zaretskii @ 2006-06-18 19:47 UTC (permalink / raw) To: Masaki Muranaka; +Cc: fischermi, gdb-patches > Cc: "Michael Fischer" <fischermi@t-online.de>, > gdb-patches@sourceware.org > From: Masaki Muranaka <monaka@monami-software.com> > Date: Sun, 18 Jun 2006 13:56:32 +0900 > > BTW, Why do we use DIRNAME_SEPARATOR, instead of PATH_SEPARATOR ? > As PATH_SEPARATOR is detected by configure, it is trustable. Not really: MinGW lacks a port of Bash, so people are using all kinds of replacements, which may well produce `:' as PATH_SEPARATOR. In particular, two popular ports, the ones from Cygwin and MSYS, will do that, I think. Cross builds are another such case. So I think we should simply hard-code that in Windows native ports. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-18 19:47 ` Eli Zaretskii @ 2006-06-19 0:27 ` Masaki Muranaka 2006-06-19 3:14 ` Eli Zaretskii 0 siblings, 1 reply; 15+ messages in thread From: Masaki Muranaka @ 2006-06-19 0:27 UTC (permalink / raw) To: Eli Zaretskii; +Cc: fischermi, gdb-patches On 2006/06/19, at 4:43, Eli Zaretskii wrote: >> Cc: "Michael Fischer" <fischermi@t-online.de>, >> gdb-patches@sourceware.org >> From: Masaki Muranaka <monaka@monami-software.com> >> Date: Sun, 18 Jun 2006 13:56:32 +0900 >> >> BTW, Why do we use DIRNAME_SEPARATOR, instead of PATH_SEPARATOR ? >> As PATH_SEPARATOR is detected by configure, it is trustable. > > Not really: MinGW lacks a port of Bash, so people are using all kinds > of replacements, which may well produce `:' as PATH_SEPARATOR. In > particular, two popular ports, the ones from Cygwin and MSYS, will do > that, I think. > > Cross builds are another such case. > > So I think we should simply hard-code that in Windows native ports. GCC3.4.x uses PATH_SEPARATOR and it seems that has no issue. What is the difference between GCC and GDB? -- Masaki Muranaka Monami software ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-19 0:27 ` Masaki Muranaka @ 2006-06-19 3:14 ` Eli Zaretskii 2006-06-19 3:38 ` Masaki Muranaka 2006-06-20 20:24 ` Daniel Jacobowitz 0 siblings, 2 replies; 15+ messages in thread From: Eli Zaretskii @ 2006-06-19 3:14 UTC (permalink / raw) To: Masaki Muranaka; +Cc: fischermi, gdb-patches > Cc: fischermi@t-online.de, gdb-patches@sourceware.org > From: Masaki Muranaka <monaka@monami-software.com> > Date: Mon, 19 Jun 2006 09:26:58 +0900 > > > So I think we should simply hard-code that in Windows native ports. > > GCC3.4.x uses PATH_SEPARATOR and it seems that has > no issue. What is the difference between GCC and GDB? I have no idea. I don't track GCC development. Someone else will have to answer that. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-19 3:14 ` Eli Zaretskii @ 2006-06-19 3:38 ` Masaki Muranaka 2006-06-20 20:24 ` Daniel Jacobowitz 1 sibling, 0 replies; 15+ messages in thread From: Masaki Muranaka @ 2006-06-19 3:38 UTC (permalink / raw) To: Eli Zaretskii; +Cc: fischermi, gdb-patches On 2006/06/19, at 12:14, Eli Zaretskii wrote: >> Cc: fischermi@t-online.de, gdb-patches@sourceware.org >> From: Masaki Muranaka <monaka@monami-software.com> >> Date: Mon, 19 Jun 2006 09:26:58 +0900 >> >>> So I think we should simply hard-code that in Windows native ports. >> >> GCC3.4.x uses PATH_SEPARATOR and it seems that has >> no issue. What is the difference between GCC and GDB? > > I have no idea. I don't track GCC development. Someone else will > have to answer that. I agree the hard-code is also one of the choice to fix. So I have no objection to apply Faylor's patch. (Although, it's possible to be re-patched.) -- Masaki Muranaka Monami software ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: AW: [PATCH] source.s: Fix problem handling windows like path with MinGW 2006-06-19 3:14 ` Eli Zaretskii 2006-06-19 3:38 ` Masaki Muranaka @ 2006-06-20 20:24 ` Daniel Jacobowitz 1 sibling, 0 replies; 15+ messages in thread From: Daniel Jacobowitz @ 2006-06-20 20:24 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Masaki Muranaka, fischermi, gdb-patches On Mon, Jun 19, 2006 at 06:14:44AM +0300, Eli Zaretskii wrote: > > Cc: fischermi@t-online.de, gdb-patches@sourceware.org > > From: Masaki Muranaka <monaka@monami-software.com> > > Date: Mon, 19 Jun 2006 09:26:58 +0900 > > > > > So I think we should simply hard-code that in Windows native ports. > > > > GCC3.4.x uses PATH_SEPARATOR and it seems that has > > no issue. What is the difference between GCC and GDB? > > I have no idea. I don't track GCC development. Someone else will > have to answer that. It does not use the PATH_SEPARATOR selected by autoconf. Don't confuse the two just because they have the same name. It's manually set in xm-mingw32.h; the one in configure is only used by configure, and reflects on the build system, not the host system. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2006-06-24 13:51 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <JLEAKDMELBINENLADICFIEFHCIAA.fischermi@t-online.de>
2006-06-18 3:24 ` AW: [PATCH] source.s: Fix problem handling windows like path with MinGW Eli Zaretskii
2006-06-18 4:56 ` Masaki Muranaka
2006-06-18 9:03 ` AW: " Michael Fischer
2006-06-18 19:47 ` Eli Zaretskii
2006-06-18 20:05 ` AW: " Michael Fischer
2006-06-18 20:16 ` Christopher Faylor
2006-06-18 20:15 ` Christopher Faylor
2006-06-19 3:22 ` Eli Zaretskii
2006-06-20 20:27 ` Daniel Jacobowitz
2006-06-24 13:51 ` Eli Zaretskii
2006-06-18 19:47 ` Eli Zaretskii
2006-06-19 0:27 ` Masaki Muranaka
2006-06-19 3:14 ` Eli Zaretskii
2006-06-19 3:38 ` Masaki Muranaka
2006-06-20 20:24 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox