From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13317 invoked by alias); 20 Jan 2010 14:23:41 -0000 Received: (qmail 13308 invoked by uid 22791); 20 Jan 2010 14:23:40 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jan 2010 14:23:34 +0000 Received: (qmail 19598 invoked from network); 20 Jan 2010 14:23:32 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jan 2010 14:23:32 -0000 From: Vladimir Prus To: Pedro Alves Subject: Re: Per-inferior program arguments and io terminal Date: Wed, 20 Jan 2010 14:23:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) Cc: gdb-patches@sourceware.org References: <201001131544.26408.vladimir@codesourcery.com> <201001200053.23457.vladimir@codesourcery.com> <201001200614.26747.pedro@codesourcery.com> In-Reply-To: <201001200614.26747.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201001201723.31137.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00499.txt.bz2 On Wednesday 20 January 2010 09:14:26 Pedro Alves wrote: > On Tuesday 19 January 2010 21:53:23, Vladimir Prus wrote: > > > Per-inferior args and tty and environment. > > > > * infcmd.c (inferior_args): Rename to ... > > (inferior_args_scratch): ... this. > > (inferior_io_terminal): Rename to ... > > (inferior_io_terminal_scratch): ... this. > > (inferior_argc, inferior_argv): Remove. > > (set_inferior_io_terminal, get_inferior_io_terminal): Store > > inside current_inferior(). > > (set_inferior_tty_command, show_inferior_tty_command): New. > > (get_inferior_args, set_inferior_args): Store inside > > current_inferior(). > > (notice_args_set): Likewise and rename to... > > (set_args_command): ... this. > > (set_inferior_args_vector): Likewise. > > (notice_args_read): Rename to... > > (show_args_command): ...new. > > (tty_command): Remove. > > (run_command_1): Don't free old args, as they are freed by > > set_inferior_arg now. > > (run_no_args_command): Likewise. > > (inferior_environ): Remove. > > (run_command_1): Use environemnt of the current inferior. > > Typo: "environemnt" > > > (environment_info, set_environment_command) > > (unset_environment_command, path_info, path_command): Likewise. > > (_initialize_infcmd): Adjust for function and variable renames. > > Do not init inferior_environ. > > * inferior.h (set_inferior_arg): Adjust prototype. > > (struct inferior): New fields args, argc, argv, terminal, environment. > > (inferior_environ): Remove declaration. > > * inferior.c (free_inferior): Free new fields. > > (add_inferior_silent): Initialize 'environment' field. > > * main.c (captured_main): Set arguments only after the initial > > inferior has been created. Set set_inferior_io_terminal, > > not tty_command. > > * mi/mi-main.c (mi_cmd_env_path): Use environment of the current > > inferior. > > (_initialize_mi_cmd_env): Adjust for disappearance of global > > inferior_environ. > > * solib.c (solib_find): Use environment of the current inferior. > > This version is OK. Thanks. Thanks, checked in. - Volodya