* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
@ 2001-06-21 9:47 David Taylor
2001-06-21 11:44 ` Eli Zaretskii
2001-07-12 0:50 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: David Taylor @ 2001-06-21 9:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, Christopher Faylor
Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT)
From: Eli Zaretskii <eliz@is.elta.co.il>
> Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> From: Eli Zaretskii <eliz@is.elta.co.il>
>
> * cli-cmds.c:
>
> /* FIXME: this should be auto-configured! */
> #ifdef __MSDOS__
> # define CANT_FORK
> #endif
>
> This seems to cry for either an Autoconf test (based on whether the
> compiler defines __MSDOS__ or not) or perhaps the whole snippet should
> be moved to config/i386/xm-go32.h.
>
>
> * cli-cmds.c:shell_escape()
>
> #ifdef __DJGPP__
> /* Make sure to return to the directory GDB thinks it is, in case the
> shell command we just ran changed it. */
> chdir (current_directory);
> #endif
>
> This code is there because the current working directory is a global
> notion (as opposed to being private to each process on Posix
> systems). Windows ports, at least the non-Cygwin ones, probably want
> this as well. Suggestions how to test this, anyone? Should we define
> a GLOBAL_CURDIR macro (zero by default)?
Here's the patch to fix these two issues. Okay to commit?
2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
* cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
call to chdir on this symbol rather than on __DJGPP__.
(CANT_FORK) [__MSDOS__]: Move from here...
* defs.h (CANT_FORK) [__MSDOS__]: ...to here.
(GLOBAL_CURDIR) [__MSDOS__]: Define.
Sorry for the delay. The defs.h part is approved.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-06-21 9:47 [RFA] Re: DOS/Windows-specific code: cli-cmds.c David Taylor
@ 2001-06-21 11:44 ` Eli Zaretskii
2001-07-12 0:50 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2001-06-21 11:44 UTC (permalink / raw)
To: taylor; +Cc: gdb-patches, cgf
> Date: Thu, 21 Jun 2001 12:47:14 -0400
> From: David Taylor <taylor@candd.org>
>
> 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
>
> * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> call to chdir on this symbol rather than on __DJGPP__.
> (CANT_FORK) [__MSDOS__]: Move from here...
> * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> (GLOBAL_CURDIR) [__MSDOS__]: Define.
>
> Sorry for the delay. The defs.h part is approved.
Thanks.
Fernando, is the patch to cli-cmds.c okay with you?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-06-21 9:47 [RFA] Re: DOS/Windows-specific code: cli-cmds.c David Taylor
2001-06-21 11:44 ` Eli Zaretskii
@ 2001-07-12 0:50 ` Eli Zaretskii
2001-07-12 5:29 ` Fernando Nasser
` (2 more replies)
1 sibling, 3 replies; 11+ messages in thread
From: Eli Zaretskii @ 2001-07-12 0:50 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches, cgf
> Date: Thu, 21 Jun 2001 12:47:14 -0400
> From: David Taylor <taylor@candd.org>
>
> Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT)
> From: Eli Zaretskii <eliz@is.elta.co.il>
>
> > Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> > From: Eli Zaretskii <eliz@is.elta.co.il>
> >
> > * cli-cmds.c:
> >
> > /* FIXME: this should be auto-configured! */
> > #ifdef __MSDOS__
> > # define CANT_FORK
> > #endif
> >
> > This seems to cry for either an Autoconf test (based on whether the
> > compiler defines __MSDOS__ or not) or perhaps the whole snippet should
> > be moved to config/i386/xm-go32.h.
> >
> >
> > * cli-cmds.c:shell_escape()
> >
> > #ifdef __DJGPP__
> > /* Make sure to return to the directory GDB thinks it is, in case the
> > shell command we just ran changed it. */
> > chdir (current_directory);
> > #endif
> >
> > This code is there because the current working directory is a global
> > notion (as opposed to being private to each process on Posix
> > systems). Windows ports, at least the non-Cygwin ones, probably want
> > this as well. Suggestions how to test this, anyone? Should we define
> > a GLOBAL_CURDIR macro (zero by default)?
>
> Here's the patch to fix these two issues. Okay to commit?
>
>
> 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
>
> * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> call to chdir on this symbol rather than on __DJGPP__.
> (CANT_FORK) [__MSDOS__]: Move from here...
> * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> (GLOBAL_CURDIR) [__MSDOS__]: Define.
>
> Sorry for the delay. The defs.h part is approved.
Fernando, could you please review this? Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 0:50 ` Eli Zaretskii
@ 2001-07-12 5:29 ` Fernando Nasser
2001-07-12 8:07 ` Eli Zaretskii
2001-07-12 10:21 ` Christopher Faylor
2001-07-12 15:38 ` Fernando Nasser
2 siblings, 1 reply; 11+ messages in thread
From: Fernando Nasser @ 2001-07-12 5:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, cgf
I cant't find the original message. Can someone send me a copy?
Thanks.
Fernando
Eli Zaretskii wrote:
>
> > Date: Thu, 21 Jun 2001 12:47:14 -0400
> > From: David Taylor <taylor@candd.org>
> >
> > Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT)
> > From: Eli Zaretskii <eliz@is.elta.co.il>
> >
> > > Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> > > From: Eli Zaretskii <eliz@is.elta.co.il>
> > >
> > > * cli-cmds.c:
> > >
> > > /* FIXME: this should be auto-configured! */
> > > #ifdef __MSDOS__
> > > # define CANT_FORK
> > > #endif
> > >
> > > This seems to cry for either an Autoconf test (based on whether the
> > > compiler defines __MSDOS__ or not) or perhaps the whole snippet should
> > > be moved to config/i386/xm-go32.h.
> > >
> > >
> > > * cli-cmds.c:shell_escape()
> > >
> > > #ifdef __DJGPP__
> > > /* Make sure to return to the directory GDB thinks it is, in case the
> > > shell command we just ran changed it. */
> > > chdir (current_directory);
> > > #endif
> > >
> > > This code is there because the current working directory is a global
> > > notion (as opposed to being private to each process on Posix
> > > systems). Windows ports, at least the non-Cygwin ones, probably want
> > > this as well. Suggestions how to test this, anyone? Should we define
> > > a GLOBAL_CURDIR macro (zero by default)?
> >
> > Here's the patch to fix these two issues. Okay to commit?
> >
> >
> > 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
> >
> > * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> > call to chdir on this symbol rather than on __DJGPP__.
> > (CANT_FORK) [__MSDOS__]: Move from here...
> > * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> > (GLOBAL_CURDIR) [__MSDOS__]: Define.
> >
> > Sorry for the delay. The defs.h part is approved.
>
> Fernando, could you please review this? Thanks.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 5:29 ` Fernando Nasser
@ 2001-07-12 8:07 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2001-07-12 8:07 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches, cgf
On Thu, 12 Jul 2001, Fernando Nasser wrote:
> I cant't find the original message. Can someone send me a copy?
I don't have a copy, but you can find the original message here:
http://sources.redhat.com/ml/gdb-patches/2001-06/msg00196.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 0:50 ` Eli Zaretskii
2001-07-12 5:29 ` Fernando Nasser
@ 2001-07-12 10:21 ` Christopher Faylor
2001-07-12 11:22 ` Eli Zaretskii
2001-07-12 15:38 ` Fernando Nasser
2 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2001-07-12 10:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Fernando Nasser, gdb-patches
On Thu, Jul 12, 2001 at 10:51:59AM +0300, Eli Zaretskii wrote:
>> Date: Thu, 21 Jun 2001 12:47:14 -0400
>> From: David Taylor <taylor@candd.org>
>>
>> Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT)
>> From: Eli Zaretskii <eliz@is.elta.co.il>
>>
>> > Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
>> > From: Eli Zaretskii <eliz@is.elta.co.il>
>> >
>> > * cli-cmds.c:
>> >
>> > /* FIXME: this should be auto-configured! */
>> > #ifdef __MSDOS__
>> > # define CANT_FORK
>> > #endif
>> >
>> > This seems to cry for either an Autoconf test (based on whether the
>> > compiler defines __MSDOS__ or not) or perhaps the whole snippet should
>> > be moved to config/i386/xm-go32.h.
>> >
>> >
>> > * cli-cmds.c:shell_escape()
>> >
>> > #ifdef __DJGPP__
>> > /* Make sure to return to the directory GDB thinks it is, in case the
>> > shell command we just ran changed it. */
>> > chdir (current_directory);
>> > #endif
>> >
>> > This code is there because the current working directory is a global
>> > notion (as opposed to being private to each process on Posix
>> > systems). Windows ports, at least the non-Cygwin ones, probably want
>> > this as well. Suggestions how to test this, anyone? Should we define
>> > a GLOBAL_CURDIR macro (zero by default)?
>>
>> Here's the patch to fix these two issues. Okay to commit?
>>
>>
>> 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
>>
>> * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
>> call to chdir on this symbol rather than on __DJGPP__.
>> (CANT_FORK) [__MSDOS__]: Move from here...
>> * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
>> (GLOBAL_CURDIR) [__MSDOS__]: Define.
>>
>> Sorry for the delay. The defs.h part is approved.
>
>Fernando, could you please review this? Thanks.
FWIW, Cygwin doesn't need any special chdir considerations. This
should be a MSDOS only issue.
cgf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 10:21 ` Christopher Faylor
@ 2001-07-12 11:22 ` Eli Zaretskii
2001-07-12 11:27 ` Christopher Faylor
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2001-07-12 11:22 UTC (permalink / raw)
To: cgf; +Cc: fnasser, gdb-patches
> Date: Thu, 12 Jul 2001 13:21:45 -0400
> From: Christopher Faylor <cgf@redhat.com>
> >>
> >> 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
> >>
> >> * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> >> call to chdir on this symbol rather than on __DJGPP__.
> >> (CANT_FORK) [__MSDOS__]: Move from here...
> >> * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> >> (GLOBAL_CURDIR) [__MSDOS__]: Define.
> >>
> >> Sorry for the delay. The defs.h part is approved.
> >
> >Fernando, could you please review this? Thanks.
>
> FWIW, Cygwin doesn't need any special chdir considerations. This
> should be a MSDOS only issue.
Well, that's why GLOBAL_CURDIR is not defined for Cygwin... ;-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 11:22 ` Eli Zaretskii
@ 2001-07-12 11:27 ` Christopher Faylor
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2001-07-12 11:27 UTC (permalink / raw)
To: gdb-patches
On Thu, Jul 12, 2001 at 09:22:33PM +0300, Eli Zaretskii wrote:
>> Date: Thu, 12 Jul 2001 13:21:45 -0400
>> From: Christopher Faylor <cgf@redhat.com>
>> >>
>> >> 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
>> >>
>> >> * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
>> >> call to chdir on this symbol rather than on __DJGPP__.
>> >> (CANT_FORK) [__MSDOS__]: Move from here...
>> >> * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
>> >> (GLOBAL_CURDIR) [__MSDOS__]: Define.
>> >>
>> >> Sorry for the delay. The defs.h part is approved.
>> >
>> >Fernando, could you please review this? Thanks.
>>
>> FWIW, Cygwin doesn't need any special chdir considerations. This
>> should be a MSDOS only issue.
>
>Well, that's why GLOBAL_CURDIR is not defined for Cygwin... ;-)
Ok. I'm just responding since I am being Cc'ed in this email.
I've redirected future responses back to gdb-patches only.
cgf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 0:50 ` Eli Zaretskii
2001-07-12 5:29 ` Fernando Nasser
2001-07-12 10:21 ` Christopher Faylor
@ 2001-07-12 15:38 ` Fernando Nasser
2001-07-16 7:14 ` Eli Zaretskii
2 siblings, 1 reply; 11+ messages in thread
From: Fernando Nasser @ 2001-07-12 15:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Fernando Nasser, gdb-patches, cgf
Eli Zaretskii wrote:
>
> > Date: Thu, 21 Jun 2001 12:47:14 -0400
> > From: David Taylor <taylor@candd.org>
> >
> > Date: Sun, 10 Jun 2001 16:28:57 +0300 (IDT)
> > From: Eli Zaretskii <eliz@is.elta.co.il>
> >
> > > Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> > > From: Eli Zaretskii <eliz@is.elta.co.il>
> > >
> > > * cli-cmds.c:
> > >
> > > /* FIXME: this should be auto-configured! */
> > > #ifdef __MSDOS__
> > > # define CANT_FORK
> > > #endif
> > >
> > > This seems to cry for either an Autoconf test (based on whether the
> > > compiler defines __MSDOS__ or not) or perhaps the whole snippet should
> > > be moved to config/i386/xm-go32.h.
> > >
> > >
> > > * cli-cmds.c:shell_escape()
> > >
> > > #ifdef __DJGPP__
> > > /* Make sure to return to the directory GDB thinks it is, in case the
> > > shell command we just ran changed it. */
> > > chdir (current_directory);
> > > #endif
> > >
> > > This code is there because the current working directory is a global
> > > notion (as opposed to being private to each process on Posix
> > > systems). Windows ports, at least the non-Cygwin ones, probably want
> > > this as well. Suggestions how to test this, anyone? Should we define
> > > a GLOBAL_CURDIR macro (zero by default)?
> >
> > Here's the patch to fix these two issues. Okay to commit?
> >
> >
> > 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
> >
> > * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> > call to chdir on this symbol rather than on __DJGPP__.
> > (CANT_FORK) [__MSDOS__]: Move from here...
> > * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> > (GLOBAL_CURDIR) [__MSDOS__]: Define.
> >
> > Sorry for the delay. The defs.h part is approved.
>
> Fernando, could you please review this? Thanks.
OK to commit.
Sorry for the delay.
Regards,
Fernando
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] Re: DOS/Windows-specific code: cli-cmds.c
2001-07-12 15:38 ` Fernando Nasser
@ 2001-07-16 7:14 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2001-07-16 7:14 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb-patches
On Thu, 12 Jul 2001, Fernando Nasser wrote:
> > > 2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
> > >
> > > * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
> > > call to chdir on this symbol rather than on __DJGPP__.
> > > (CANT_FORK) [__MSDOS__]: Move from here...
> > > * defs.h (CANT_FORK) [__MSDOS__]: ...to here.
> > > (GLOBAL_CURDIR) [__MSDOS__]: Define.
> > >
> > > Sorry for the delay. The defs.h part is approved.
> >
> > Fernando, could you please review this? Thanks.
>
> OK to commit.
Committed. Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFA] Re: DOS/Windows-specific code: cli-cmds.c
[not found] ` <200105081141.OAA06131@is.elta.co.il>
@ 2001-06-10 6:27 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2001-06-10 6:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Christopher Faylor
> Date: Tue, 8 May 2001 14:41:53 +0300 (IDT)
> From: Eli Zaretskii <eliz@is.elta.co.il>
>
> * cli-cmds.c:
>
> /* FIXME: this should be auto-configured! */
> #ifdef __MSDOS__
> # define CANT_FORK
> #endif
>
> This seems to cry for either an Autoconf test (based on whether the
> compiler defines __MSDOS__ or not) or perhaps the whole snippet should
> be moved to config/i386/xm-go32.h.
>
>
> * cli-cmds.c:shell_escape()
>
> #ifdef __DJGPP__
> /* Make sure to return to the directory GDB thinks it is, in case the
> shell command we just ran changed it. */
> chdir (current_directory);
> #endif
>
> This code is there because the current working directory is a global
> notion (as opposed to being private to each process on Posix
> systems). Windows ports, at least the non-Cygwin ones, probably want
> this as well. Suggestions how to test this, anyone? Should we define
> a GLOBAL_CURDIR macro (zero by default)?
Here's the patch to fix these two issues. Okay to commit?
2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>
* cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition the
call to chdir on this symbol rather than on __DJGPP__.
(CANT_FORK) [__MSDOS__]: Move from here...
* defs.h (CANT_FORK) [__MSDOS__]: ...to here.
(GLOBAL_CURDIR) [__MSDOS__]: Define.
--- gdb/defs.h~0 Mon Jun 4 09:38:04 2001
+++ gdb/defs.h Sun Jun 10 16:08:22 2001
@@ -1372,6 +1372,11 @@
#endif
#endif
+#ifdef __MSDOS__
+# define CANT_FORK
+# define GLOBAL_CURDIR
+#endif
+
/* Provide default definitions of PIDGET, TIDGET, and MERGEPID.
The name ``TIDGET'' is a historical accident. Many uses of TIDGET
in the code actually refer to a lightweight process id, i.e,
--- gdb/cli/cli-cmds.c~0 Wed Jun 6 12:25:24 2001
+++ gdb/cli/cli-cmds.c Sun Jun 10 16:10:18 2001
@@ -39,11 +39,6 @@
#define GDBINIT_FILENAME ".gdbinit"
#endif
-/* FIXME: this should be auto-configured! */
-#ifdef __MSDOS__
-# define CANT_FORK
-#endif
-
/* From gdb/top.c */
extern void dont_repeat (void);
@@ -454,7 +449,7 @@
fprintf_unfiltered (gdb_stderr, "%s exited with status %d\n", arg, rc);
gdb_flush (gdb_stderr);
}
-#ifdef __DJGPP__
+#ifdef GLOBAL_CURDIR
/* Make sure to return to the directory GDB thinks it is, in case the
shell command we just ran changed it. */
chdir (current_directory);
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-07-16 7:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21 9:47 [RFA] Re: DOS/Windows-specific code: cli-cmds.c David Taylor
2001-06-21 11:44 ` Eli Zaretskii
2001-07-12 0:50 ` Eli Zaretskii
2001-07-12 5:29 ` Fernando Nasser
2001-07-12 8:07 ` Eli Zaretskii
2001-07-12 10:21 ` Christopher Faylor
2001-07-12 11:22 ` Eli Zaretskii
2001-07-12 11:27 ` Christopher Faylor
2001-07-12 15:38 ` Fernando Nasser
2001-07-16 7:14 ` Eli Zaretskii
[not found] <20010503211502.21716.qmail@web6401.mail.yahoo.com>
[not found] ` <3AF1DAA0.3060702@cygnus.com>
[not found] ` <200105071609.TAA24129@is.elta.co.il>
[not found] ` <200105081141.OAA06131@is.elta.co.il>
2001-06-10 6:27 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox