aboutsummaryrefslogtreecommitdiff
path: root/gdb/win32-nat.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1996-02-01 18:39:00 +0000
committerSteve Chamberlain <sac@cygnus>1996-02-01 18:39:00 +0000
commit3d78f53277a7eb4bd064e4eddbc578132140e750 (patch)
treee0f97fdc134f72ab799452e23b1fc03550a306d7 /gdb/win32-nat.c
parent9daacfc4e493fe886bc3374fe41d26671cef841c (diff)
downloadgdb-3d78f53277a7eb4bd064e4eddbc578132140e750.zip
gdb-3d78f53277a7eb4bd064e4eddbc578132140e750.tar.gz
gdb-3d78f53277a7eb4bd064e4eddbc578132140e750.tar.bz2
* config/powerpc/(cygwin32.mh, cygwin32.mt, tm-cygwin32.h,
xm-cygwin32.h): New. * config/i386/(*win32*): Becomes *cygwin32*. * configure.in (i[3456]86-*-win32*): Becomes i[3456]86-*-cygwin32. (powerpcle-*-cygwin32): New. * configure: Regenerate. * win32-nat.c (child_create_inferior): Call CreateProcess with the right program arg.
Diffstat (limited to 'gdb/win32-nat.c')
-rw-r--r--gdb/win32-nat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index e295a66..eee2474 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -475,9 +475,10 @@ child_create_inferior (exec_file, allargs, env)
if (new_console)
flags |= CREATE_NEW_CONSOLE;
- args = alloca (strlen (exec_file) + strlen (allargs) + 2);
+ args = alloca (strlen (real_path) + strlen (allargs) + 2);
+
+ strcpy (args, real_path);
- strcpy (args, exec_file);
strcat (args, " ");
strcat (args, allargs);
@@ -489,18 +490,15 @@ child_create_inferior (exec_file, allargs, env)
winenv = alloca(envlen + 1); /* allocate new buffer */
/* copy env strings into new buffer */
- for (temp = winenv, i = 0; env[i] && *env[i]; i++)
+ for (temp = winenv, i = 0; env[i] && *env[i]; i++)
{
strcpy(temp, env[i]);
temp += strlen(temp) + 1;
}
*temp = 0; /* final nil string to terminate new env */
- strcat (real_path, " ");
- strcat (real_path, args);
-
ret = CreateProcess (0,
- real_path,
+ args, /* command line */
NULL, /* Security */
NULL, /* thread */
TRUE, /* inherit handles */