From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8464 invoked by alias); 27 May 2011 17:47:33 -0000 Received: (qmail 8453 invoked by uid 22791); 27 May 2011 17:47:33 -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, 27 May 2011 17:47:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4RHl2Bc020656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 May 2011 13:47:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4RHl0iX014492; Fri, 27 May 2011 13:47:00 -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 p4RHl078009029; Fri, 27 May 2011 13:47:00 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CE9C33781BA; Fri, 27 May 2011 11:46:59 -0600 (MDT) From: Tom Tromey To: Mike Frysinger Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Subject: Re: [PATCH] gdb: sim: automatically pass down sysroot References: <1306440200-25087-1-git-send-email-vapier__8251.52545371584$1306440225$gmane$org@gentoo.org> Date: Fri, 27 May 2011 17:47:00 -0000 In-Reply-To: <1306440200-25087-1-git-send-email-vapier__8251.52545371584$1306440225$gmane$org@gentoo.org> (Mike Frysinger's message of "Thu, 26 May 2011 16:03:20 -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-05/txt/msg00641.txt.bz2 >>>>> "Mike" == Mike Frysinger writes: Mike> 2011-05-26 Mike Frysinger Mike> * remote-sim.c (gdbsim_open): Add the strlen of " --sysroot=" and Mike> gdb_sysroot to the "len" variable. Append both to "arg_buf". It seems reasonable to me. Ok. Mike> + strcat (arg_buf, gdb_sysroot); It seems like this will give wrong results if the sysroot needs quoting. But, this problem could affect other arguments here. Offhand it seems like it would be better if this code directly built sim_argv rather than building a string and converting it, but I don't know if any odd issue is lurking. Tom