From: Tristan Gingold <gingold@adacore.com>
To: Abhijit Halder <abhijit.k.halder@gmail.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>,
Pedro Alves <pedro@codesourcery.com>
Subject: Re: [RFA] Preliminary work in fork_inferior
Date: Fri, 16 Sep 2011 14:55:00 -0000 [thread overview]
Message-ID: <8863EA9F-FF7C-4A5C-B625-8CDF225797CD@adacore.com> (raw)
In-Reply-To: <CAOhZP9wOgg3ti2a=+7XJYWDvje+_Br4r+DX1okJy3o4fS4XBSA@mail.gmail.com>
On Sep 16, 2011, at 4:43 PM, Abhijit Halder wrote:
> On Fri, Sep 16, 2011 at 5:58 PM, Tristan Gingold <gingold@adacore.com> wrote:
[…]
>> --- a/gdb/fork-child.c
>> +++ b/gdb/fork-child.c
>> @@ -126,9 +126,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
>> void (*pre_trace_fun) (void), char *shell_file_arg)
>> {
>> int pid;
>> - char *shell_command;
>> static char default_shell_file[] = SHELL_FILE;
> I don't know whether this is relevant, but I think the SHELL_FILE
> macro is defined as "/bin/sh" and this will not work for MinGW. Some
> similar comments were popped up during the review of my patch for
> adding pipe command in GDB. I'm relating this to that.
Well, given that this file deals with spawning via [v]fork+exec it won't work at all for MinGW :-)
>> - argv = (char **) xmalloc (argc * sizeof (*argv));
>> + argv = (char **) alloca (argc * sizeof (*argv));
> alloca is not a portable function I guess.
Although alloca is not part of ANSI-C, it is heavily used by GNU software and available almost everywhere.
There is even a replacement alloca function in libiberty but I am pretty sure it wasn't used for a long time.
Tristan.
prev parent reply other threads:[~2011-09-16 14:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 13:09 [RFC] Support of Lion (darwin 11) Tristan Gingold
2011-09-07 13:14 ` Pedro Alves
2011-09-07 13:28 ` Pedro Alves
2011-09-07 13:47 ` Tristan Gingold
2011-09-16 13:20 ` [RFA] Preliminary work in fork_inferior Tristan Gingold
2011-09-16 14:38 ` Pedro Alves
2011-09-16 14:52 ` Tristan Gingold
2011-09-16 15:28 ` Pedro Alves
2011-09-16 18:25 ` Tristan Gingold
2011-09-16 14:47 ` Abhijit Halder
2011-09-16 14:55 ` Tristan Gingold [this message]
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=8863EA9F-FF7C-4A5C-B625-8CDF225797CD@adacore.com \
--to=gingold@adacore.com \
--cc=abhijit.k.halder@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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