From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13902 invoked by alias); 12 Feb 2003 16:45:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13895 invoked from network); 12 Feb 2003 16:45:19 -0000 Received: from unknown (HELO localhost.redhat.com) (193.41.215.82) by 172.16.49.205 with SMTP; 12 Feb 2003 16:45:19 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6C5F03CE5; Wed, 12 Feb 2003 17:45:20 +0100 (CET) Message-ID: <3E4A7A20.30403@redhat.com> Date: Wed, 12 Feb 2003 16:45:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Keith Seitz , Elena Zannoni Cc: "gdb-patches@sources.redhat.com" Subject: Re: [RFA] Make interpreter_p an argument for gdb_main References: <1045011304.1493.43.camel@lindt.uglyboxes.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00286.txt.bz2 Since elena's overloaded I'll pick this up. > + char *interpreter_p; Should be const. > - /* There will always be an interpreter. Either the one passed into > - this captured main (not yet implemented), or one specified by the > - user at start up, or the console. Make life easier by always > - initializing the interpreter to something. */ > - interpreter_p = xstrdup (INTERP_CONSOLE); Can you please keep the assignment here (instead of below). > - > /* Parse arguments and options. */ > { > int c; > @@ -803,6 +797,7 @@ int > gdb_main (struct captured_main_args *args) > { > use_windows = args->use_windows; > + interpreter_p = xstrdup (args->interpreter_p); > catch_errors (captured_main, args, "", RETURN_MASK_ALL); > return 0; > } ``interpreter_p'' is -><- close to being made local to captured_main. Otherwize ok, Andrew