From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114967 invoked by alias); 14 Oct 2019 03:02:13 -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 114899 invoked by uid 89); 14 Oct 2019 03:02:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=weigh X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Oct 2019 03:02:10 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x9E3227o009829 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 13 Oct 2019 23:02:08 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca x9E3227o009829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1571022129; bh=WL/9lp+SO2AUAVaW61TgMfe77A/T+lph0Io24Ba3jmI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Z3OhqmWm6JksVN1QD32K/Ht1z3L+orEU6lw1FZgkSEDo2ZtHHYAy9fuHVq3pOo0jL rQt9YFSw4oxa2Nj8qedraWuU75lxtQOeg++yc4A16XsIigMPi/g11wwuhaIK20yT5p n3IhexF3cuiTF12/urFjEk7Xhx2X5QseAJarmi8U= Received: by simark.ca (Postfix, from userid 112) id 7CBE21E79E; Sun, 13 Oct 2019 23:02:02 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 70C341E4C2; Sun, 13 Oct 2019 23:02:01 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 14 Oct 2019 03:02:00 -0000 From: Simon Marchi To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] Fix BZ 25065 - Ensure that physnames are computed for inherited DIEs In-Reply-To: <20191014001842.27413-2-kevinb@redhat.com> References: <20191014001842.27413-1-kevinb@redhat.com> <20191014001842.27413-2-kevinb@redhat.com> Message-ID: <8c073683bc0b0a8e7918fdfb346cbb03@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.10 X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00330.txt.bz2 Hi Kevin, I don't really have the big picture of these advanced DWARF use cases, so I can't really weigh on this, but I have a question: > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index ee9df34ed2..f7ef122933 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -13666,6 +13666,17 @@ inherit_abstract_dies (struct die_info *die, > struct dwarf2_cu *cu) > origin_child_die = sibling_die (origin_child_die); > } > origin_cu->list_in_scope = origin_previous_list_in_scope; > + > + if (cu != origin_cu && !origin_cu->method_list.empty ()) > + { > + /* Add list of methods found in origin_cu to the list in cu. > These > + methods still need to have their physnames computed in > + compute_delayed_physnames(). */ > + cu->method_list.insert (cu->method_list.end (), > + origin_cu->method_list.begin (), > + origin_cu->method_list.end ()); > + origin_cu->method_list.clear (); > + } So, this effectively makes the inheriting CU steal the method_list content from the inherited from CU? Is it possible for a CU to be inherited from multiple times? If so, what happens the second time we process something that inherits from this CU, the method_list vector will then be empty? Is it that we want? Simon