From 3d78f53277a7eb4bd064e4eddbc578132140e750 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Thu, 1 Feb 1996 18:39:00 +0000 Subject: * 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. --- gdb/win32-nat.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gdb/win32-nat.c') 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 */ -- cgit v1.1