From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 944 invoked by alias); 3 Jun 2011 16:56:59 -0000 Received: (qmail 931 invoked by uid 22791); 3 Jun 2011 16:56:57 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_RG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Jun 2011 16:56:37 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p53GuQcK031692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 3 Jun 2011 12:56:26 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p53GuPT7008491; Fri, 3 Jun 2011 12:56:25 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p53GuOIq004222; Fri, 3 Jun 2011 12:56:25 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 6951237817D; Fri, 3 Jun 2011 10:56:24 -0600 (MDT) From: Tom Tromey To: Mike Frysinger Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Subject: Re: [PATCH/RFC] new argv handlers to help with sim argv building References: <1306440200-25087-1-git-send-email-vapier__8251.52545371584$1306440225$gmane$org@gentoo.org> <201106011217.55915.vapier@gentoo.org> Date: Fri, 03 Jun 2011 16:56:00 -0000 In-Reply-To: <201106011217.55915.vapier@gentoo.org> (Mike Frysinger's message of "Wed, 1 Jun 2011 12:17:54 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-06/txt/msg00056.txt.bz2 >>>>> "Mike" == Mike Frysinger writes: Mike> i slapped this together. what do you think (ignoring missing docs) ? It seems reasonable to me overall, though see below. Mike> +char **appendargv (char **argv, const char *arg, ...) Wrong formatting. The canonical source for libiberty is gcc, so changes have to go there. Mike> + argv = appendargv (argv, "--sysroot", gdb_sysroot, NULL); [...] Mike> + uargv = gdb_buildargv (args); Mike> + sim_argv = mergeargv (argv, uargv, NULL); Mike> + freeargv (argv); If there is only one argument potentially needing quoting from buildargv, and we have to do splitting and merging as well, then it seems like it would be simpler to just add a quoting function and use that. Tom