* [RFA] honor new-console and new-group in win32-nat.c
@ 2002-02-22 0:49 Pierre Muller
2002-02-22 8:25 ` Christopher Faylor
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2002-02-22 0:49 UTC (permalink / raw)
To: gdb-patches
Since the shell patch in win32-nat.c,
the new-group and new-console commands are igonred.
This is due to a small mistake in child_create_inferior.
The following patch fixed this.
If you use new-console, this patch will also expose
another problem (not fixed here), which is that the
shell is not allowed to exit after exit of the debuggee.
Christopher, shouldn't you set usesshell to 0
already so that other people trying to use the cygwin native
from CVS will be able to use it normally until you
fix the other problems relative to shell usage.
2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (child_create_inferior): Fix create flags setting bug.
$ cvs diff -up win32-nat.c
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.55
diff -u -p -r1.55 win32-nat.c
--- win32-nat.c 2002/02/22 01:35:59 1.55
+++ win32-nat.c 2002/02/22 08:42:16
@@ -1478,7 +1478,7 @@ child_create_inferior (char *exec_file,
if (!useshell || !shell[0])
{
- flags = DEBUG_ONLY_THIS_PROCESS;
+ flags |= DEBUG_ONLY_THIS_PROCESS;
cygwin_conv_to_win32_path (exec_file, real_path);
toexec = real_path;
}
@@ -1488,7 +1488,7 @@ child_create_inferior (char *exec_file,
sprintf (newallargs, " -c 'exec %s %s'", exec_file, allargs);
allargs = newallargs;
toexec = shell;
- flags = DEBUG_PROCESS;
+ flags |= DEBUG_PROCESS;
}
args = alloca (strlen (toexec) + strlen (allargs) + 2);
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFA] honor new-console and new-group in win32-nat.c
2002-02-22 0:49 [RFA] honor new-console and new-group in win32-nat.c Pierre Muller
@ 2002-02-22 8:25 ` Christopher Faylor
2002-02-22 8:28 ` Christopher Faylor
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Faylor @ 2002-02-22 8:25 UTC (permalink / raw)
To: gdb-patches
On Fri, Feb 22, 2002 at 09:48:41AM +0100, Pierre Muller wrote:
>
>Since the shell patch in win32-nat.c,
>the new-group and new-console commands are igonred.
>
>This is due to a small mistake in child_create_inferior.
>
>The following patch fixed this.
>If you use new-console, this patch will also expose
>another problem (not fixed here), which is that the
>shell is not allowed to exit after exit of the debuggee.
>
>Christopher, shouldn't you set usesshell to 0
>already so that other people trying to use the cygwin native
>from CVS will be able to use it normally until you
>fix the other problems relative to shell usage.
>
>
>2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * win32-nat.c (child_create_inferior): Fix create flags setting bug.
Ok. Please check in.
cgf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] honor new-console and new-group in win32-nat.c
2002-02-22 8:25 ` Christopher Faylor
@ 2002-02-22 8:28 ` Christopher Faylor
2002-02-22 9:05 ` Pierre Muller
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Faylor @ 2002-02-22 8:28 UTC (permalink / raw)
To: gdb-patches
On Fri, Feb 22, 2002 at 11:25:41AM -0500, Christopher Faylor wrote:
>On Fri, Feb 22, 2002 at 09:48:41AM +0100, Pierre Muller wrote:
>>
>>Since the shell patch in win32-nat.c,
>>the new-group and new-console commands are igonred.
>>
>>This is due to a small mistake in child_create_inferior.
>>
>>The following patch fixed this.
>>If you use new-console, this patch will also expose
>>another problem (not fixed here), which is that the
>>shell is not allowed to exit after exit of the debuggee.
>>
>>Christopher, shouldn't you set usesshell to 0
>>already so that other people trying to use the cygwin native
>>from CVS will be able to use it normally until you
>>fix the other problems relative to shell usage.
>>
>>
>>2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
>>
>> * win32-nat.c (child_create_inferior): Fix create flags setting bug.
>
>Ok. Please check in.
Actually. Wait. There's a better way to do this. Sorry.
Just get rid of the flags = 0 and move the useshell stuff prior to
the flags |=. That's what I'd intended to do but muffed the placement
of the useshell conditionals.
cgf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] honor new-console and new-group in win32-nat.c
2002-02-22 8:28 ` Christopher Faylor
@ 2002-02-22 9:05 ` Pierre Muller
0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2002-02-22 9:05 UTC (permalink / raw)
To: gdb-patches
>Actually. Wait. There's a better way to do this. Sorry.
>
>Just get rid of the flags = 0 and move the useshell stuff prior to
>the flags |=. That's what I'd intended to do but muffed the placement
>of the useshell conditionals.
OK I committed this:
2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (child_create_inferior): Fix create flags setting bug.
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.55
diff -u -p -r1.55 win32-nat.c
--- win32-nat.c 2002/02/22 01:35:59 1.55
+++ win32-nat.c 2002/02/22 16:58:40
@@ -1468,14 +1468,6 @@ child_create_inferior (char *exec_file,
memset (&si, 0, sizeof (si));
si.cb = sizeof (si);
- flags = 0;
-
- if (new_group)
- flags |= CREATE_NEW_PROCESS_GROUP;
-
- if (new_console)
- flags |= CREATE_NEW_CONSOLE;
-
if (!useshell || !shell[0])
{
flags = DEBUG_ONLY_THIS_PROCESS;
@@ -1484,12 +1476,19 @@ child_create_inferior (char *exec_file,
}
else
{
- char *newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file)
strlen (allargs) + 2);
+ char *newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file)
+ + strlen (allargs) + 2);
sprintf (newallargs, " -c 'exec %s %s'", exec_file, allargs);
allargs = newallargs;
toexec = shell;
flags = DEBUG_PROCESS;
}
+
+ if (new_group)
+ flags |= CREATE_NEW_PROCESS_GROUP;
+
+ if (new_console)
+ flags |= CREATE_NEW_CONSOLE;
args = alloca (strlen (toexec) + strlen (allargs) + 2);
strcpy (args, toexec);
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-02-22 17:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-22 0:49 [RFA] honor new-console and new-group in win32-nat.c Pierre Muller
2002-02-22 8:25 ` Christopher Faylor
2002-02-22 8:28 ` Christopher Faylor
2002-02-22 9:05 ` Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox