Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tak Ota <Takaaki.Ota@am.sony.com>
To: cygwin@cygwin.com, cgf@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: gdb run < file
Date: Sat, 30 Jun 2001 22:20:00 -0000	[thread overview]
Message-ID: <20010630.222024.57970718.Takaaki.Ota@am.sony.com> (raw)
In-Reply-To: <20010630.172314.42414222.Takaaki.Ota@am.sony.com>

This is much simpler and cleaner than the previous attempt.  And it is
the *CORRECT* implementation from UNIX point of view.  The existence
of "SHELL" environment variable does not necessarily guaranty that it
is usable for this purpose.  This needs to be improved.

-Tak

\f
*** win32-nat.org.c	Wed Apr 18 13:27:11 2001
--- win32-nat.c	Sat Jun 30 21:59:29 2001
***************
*** 1084,1090 ****
  static void
  child_create_inferior (char *exec_file, char *allargs, char **env)
  {
!   char real_path[MAXPATHLEN];
    char *winenv;
    char *temp;
    int envlen;
--- 1084,1090 ----
  static void
  child_create_inferior (char *exec_file, char *allargs, char **env)
  {
!   char *shell;
    char *winenv;
    char *temp;
    int envlen;
***************
*** 1101,1108 ****
    memset (&si, 0, sizeof (si));
    si.cb = sizeof (si);
  
-   cygwin_conv_to_win32_path (exec_file, real_path);
- 
    flags = DEBUG_ONLY_THIS_PROCESS;
  
    if (new_group)
--- 1101,1106 ----
***************
*** 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.  */
    {
--- 1109,1132 ----
    if (new_console)
      flags |= CREATE_NEW_CONSOLE;
  
!   shell = getenv ("SHELL");
!   if (shell)
!     {
!       char *exec_format = "%s -c 'exec %s %s'";
! 
!       args = alloca (strlen (exec_format) + strlen (shell) + strlen (exec_file) + strlen (allargs));
!       sprintf(args, exec_format, shell, exec_file, allargs);
!     }
!   else
!     {
!       char real_path[MAXPATHLEN];
! 
!       cygwin_conv_to_win32_path (exec_file, real_path);
!       args = alloca (strlen (real_path) + strlen (allargs) + 2);
!       strcpy (args, real_path);
!       strcat (args, " ");
!       strcat (args, allargs);
!     }
  
    /* Prepare the environment vars for CreateProcess.  */
    {


  reply	other threads:[~2001-06-30 22:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010626.234402.21347360.Takaaki.Ota@am.sony.com>
     [not found] ` <20010627025036.B20160@redhat.com>
     [not found]   ` <20010627.235700.01365880.Takaaki.Ota@am.sony.com>
2001-06-28 19:05     ` Christopher Faylor
2001-06-28 21:45       ` Tak Ota
2001-06-29  0:20       ` Eli Zaretskii
2001-06-29 13:53         ` Christopher Faylor
2001-06-29 13:55           ` Christopher Faylor
2001-06-29 23:36           ` Eli Zaretskii
2001-06-30 10:25             ` Christopher Faylor
2001-06-30 17:23               ` Tak Ota
2001-06-30 22:20                 ` Tak Ota [this message]
2001-07-01  1:20                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010630.222024.57970718.Takaaki.Ota@am.sony.com \
    --to=takaaki.ota@am.sony.com \
    --cc=cgf@redhat.com \
    --cc=cygwin@cygwin.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox