Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Sat, 30 Jun 2001 17:23:14 -0700 (PDT)
Message-Id: <20010630.172314.42414222.Takaaki.Ota@am.sony.com>
To: cygwin@cygwin.com, cgf@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: gdb run < file
From: Tak Ota <Takaaki.Ota@am.sony.com>
In-Reply-To: <20010630132556.E12695@redhat.com>
References: <20010629165352.B8545@redhat.com>
	<1438-Sat30Jun2001093330+0300-eliz@is.elta.co.il>
	<20010630132556.E12695@redhat.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 <cgf@redhat.com> 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/

