aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2002-02-22 17:04:25 +0000
committerPierre Muller <muller@sourceware.org>2002-02-22 17:04:25 +0000
commiteeb25b8ac9b4fa293dac00e255072347ad3be20f (patch)
tree5a8ee9c64df79ca4418cbb46a0c38034cf746dc9 /gdb
parent2cb30cd57fc2eb122a0f65920a1b251afac19117 (diff)
downloadgdb-eeb25b8ac9b4fa293dac00e255072347ad3be20f.zip
gdb-eeb25b8ac9b4fa293dac00e255072347ad3be20f.tar.gz
gdb-eeb25b8ac9b4fa293dac00e255072347ad3be20f.tar.bz2
2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (child_create_inferior): Fix create flags setting bug.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/win32-nat.c17
-rw-r--r--gdb/windows-nat.c17
3 files changed, 20 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 02c3e79..cdca513 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-22 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * win32-nat.c (child_create_inferior): Fix create flags setting bug.
+
2002-02-21 Christopher Faylor <cgf@redhat.com>
* win32-nat.c (register_loaded_dll): Just use raw name when we can't
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 2ef28e0..ddbcd0b 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1468,14 +1468,6 @@ child_create_inferior (char *exec_file, char *allargs, char **env)
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,13 +1476,20 @@ child_create_inferior (char *exec_file, char *allargs, char **env)
}
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);
strcat (args, " ");
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 2ef28e0..ddbcd0b 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1468,14 +1468,6 @@ child_create_inferior (char *exec_file, char *allargs, char **env)
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,13 +1476,20 @@ child_create_inferior (char *exec_file, char *allargs, char **env)
}
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);
strcat (args, " ");