From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20249 invoked by alias); 19 Sep 2019 17:45:00 -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 20241 invoked by uid 89); 19 Sep 2019 17:45:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.1 spammy=strips X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Sep 2019 17:44:58 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 146293B028 for ; Thu, 19 Sep 2019 12:44:56 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id B0UCiZhRp90onB0UCiHPfb; Thu, 19 Sep 2019 12:44:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5QfmNXx6dHFuBtIKf9eH5AMkulFtoD0LPZeW+bQzJVc=; b=ofX1lVKNpRVywi/QAWkp8ekJ00 zTWVvqcva5CoB8MWA2Ft0GiGjjiNsvhL9CvCknV2XbdLCf4WQhmCk83QYPDPCeJEg2RgS4Ik381L7 pDSqIOB9K0GmSsA8UY2KEKKWX; Received: from 71-218-73-27.hlrn.qwest.net ([71.218.73.27]:59390 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iB0UB-000gnd-O4; Thu, 19 Sep 2019 12:44:55 -0500 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 2/8] Handle copy relocations References: <20190801170412.5553-1-tromey@adacore.com> <20190801170412.5553-3-tromey@adacore.com> <20190821153528.GH6076@embecosm.com> <87ftlul4ed.fsf@tromey.com> <20190822084129.GK6076@embecosm.com> Date: Thu, 19 Sep 2019 17:45:00 -0000 In-Reply-To: <20190822084129.GK6076@embecosm.com> (Andrew Burgess's message of "Thu, 22 Aug 2019 09:41:29 +0100") Message-ID: <87zhj0qiy1.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-09/txt/msg00371.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> So then I thought, surely we can do better, maybe add a single object Andrew> iterator and have lookup_minimal_symbol_text not walk through all Andrew> object files.... but then I spotted this condition: Andrew> if (objf == NULL || objf == objfile Andrew> || objf == objfile->separate_debug_objfile_backlink) Andrew> { Andrew> /* Process object file. */ Andrew> } Andrew> So, in this case we have to scan all objfiles in case we have split Andrew> debug information. Wouldn't this apply to your new function too? TBH I was not sure. Can we really have a minimal symbol that appears in the separate debug info but not in the main objfile? I guess maybe it's possible if one strips the main objfile. I'll change my patch. Andrew> I guess I'm thinking that we could merge the core of Andrew> lookup_minimal_symbol_text and lookup_minimal_symbol_linkage (or Andrew> _data), and just pass in a comparison function to check for either Andrew> text or data symbols. Sounds good, I'll try that. There is already a separate debug iterator, so maybe that can be used as well. >> I guess I don't care all that much (as evidenced by the original choice >> of name ;) so if you still like that better, I'll make the change. Andrew> Meh! I guess my only request would be can the comment at least explain Andrew> that it's similar to *_text but for data as currently neither the Andrew> function name nor the comment mention data at all. I'll fix that up too. Tom