Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sat, 30 Jun 2001 17:23:14 -0700 (PDT) Message-Id: <20010630.172314.42414222.Takaaki.Ota@am.sony.com> To: cygwin AT cygwin DOT com, cgf AT redhat DOT com Cc: gdb AT sources DOT redhat DOT com Subject: Re: gdb run < file From: Tak Ota In-Reply-To: <20010630132556.E12695@redhat.com> References: <20010629165352 DOT B8545 AT redhat DOT com> <1438-Sat30Jun2001093330+0300-eliz AT is DOT elta DOT co DOT il> <20010630132556 DOT E12695 AT redhat DOT com> X-Mailer: Mew version 1.95b126 on Emacs 21.0.103.1 / Mule 5.0 (SAKAKI) X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 Organization: Sony Electronics Inc. Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Sat, 30 Jun 2001 13:25:57 -0400, Christopher Faylor wrote: > Perhaps. However, implementing this the UNIX way should be relatively > trivial. It at least deserves study before we throw in the towel. This You are right. > I really regret not suggesting that the original poster explore the > "follow fork" solution. I also forgot to preload the expectation that > an assignment form was necessary. That was probably discouraging. Don't regret. I think I am doing the right thing. As I've said before what I tried first was admittedly a kludge solution. I am done with that and now exploring the correct unix way. This is experimental (shell is hard coded as "bash") however the mechanism seems to be working. I only need to add some more code to figure out what the user's shell is. -Tak *** win32-nat.org.c Wed Apr 18 13:27:11 2001 --- win32-nat.c Sat Jun 30 16:51:52 2001 *************** *** 1094,1099 **** --- 1094,1100 ---- BOOL ret; DWORD flags; char *args; + char *shell = "bash -c 'exec %s %s'"; if (!exec_file) error ("No executable specified, use `target exec'.\n"); *************** *** 1101,1107 **** memset (&si, 0, sizeof (si)); si.cb = sizeof (si); ! cygwin_conv_to_win32_path (exec_file, real_path); flags = DEBUG_ONLY_THIS_PROCESS; --- 1102,1108 ---- memset (&si, 0, sizeof (si)); si.cb = sizeof (si); ! /*cygwin_conv_to_win32_path (exec_file, real_path);*/ flags = DEBUG_ONLY_THIS_PROCESS; *************** *** 1111,1122 **** if (new_console) flags |= CREATE_NEW_CONSOLE; ! args = alloca (strlen (real_path) + strlen (allargs) + 2); ! strcpy (args, real_path); ! ! strcat (args, " "); ! strcat (args, allargs); /* Prepare the environment vars for CreateProcess. */ { --- 1112,1120 ---- if (new_console) flags |= CREATE_NEW_CONSOLE; ! args = alloca (strlen(shell) + strlen (exec_file) + strlen (allargs) + 2); ! sprintf(args, shell, exec_file, allargs); /* Prepare the environment vars for CreateProcess. */ { -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/