From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9171 invoked by alias); 24 Jun 2015 10:30:30 -0000 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 Received: (qmail 9153 invoked by uid 89); 24 Jun 2015 10:30:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 24 Jun 2015 10:30:29 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 0136736B4D4; Wed, 24 Jun 2015 10:30:27 +0000 (UTC) Received: from blade.nx (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5OAUQtp000510; Wed, 24 Jun 2015 06:30:27 -0400 Received: by blade.nx (Postfix, from userid 1000) id 9EE6A2642CB; Wed, 24 Jun 2015 11:30:25 +0100 (BST) Date: Wed, 24 Jun 2015 10:30:00 -0000 From: Gary Benson To: Mike Frysinger Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: sim: handle target sysroot prefix Message-ID: <20150624103025.GA11787@blade.nx> References: <1434910105-7023-1-git-send-email-vapier@gentoo.org> <20150622095026.GA22082@blade.nx> <20150623152826.GG17734@vapier> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150623152826.GG17734@vapier> X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00514.txt.bz2 Mike Frysinger wrote: > On 22 Jun 2015 10:50, Gary Benson wrote: > > Please note that gdb_sysroot can be NULL. > > how so ? main.c:captured_main specifically handles that: > > /* Set the sysroot path. */ > gdb_sysroot = relocate_gdb_directory (TARGET_SYSTEM_ROOT, > TARGET_SYSTEM_ROOT_RELOCATABLE); > > if (gdb_sysroot == NULL || *gdb_sysroot == '\0') > { > xfree (gdb_sysroot); > gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX); > } Good point. I may go and clear out all the gdb_sysroot == NULL checks. Cheers, Gary -- http://gbenson.net/