From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51830 invoked by alias); 25 Jan 2018 12:59:14 -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 51820 invoked by uid 89); 25 Jan 2018 12:59:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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 ESMTP; Thu, 25 Jan 2018 12:59:13 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1EDF7C070E2F; Thu, 25 Jan 2018 12:59:12 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CB5D609AA; Thu, 25 Jan 2018 12:59:11 +0000 (UTC) Subject: Re: [PATCH 6/7] Move fixup_partial_die to partial_die_info::fixup To: Yao Qi , gdb-patches@sourceware.org References: <1516873114-7449-1-git-send-email-yao.qi@linaro.org> <1516873114-7449-7-git-send-email-yao.qi@linaro.org> From: Pedro Alves Message-ID: <7ec76915-7c39-04dc-4903-918531056500@redhat.com> Date: Thu, 25 Jan 2018 12:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1516873114-7449-7-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00519.txt.bz2 On 01/25/2018 09:38 AM, Yao Qi wrote: > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index 0ee102a..9b6f2ec 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -1410,6 +1410,11 @@ struct partial_die_info > load_partial_dies. */ > partial_die_info& operator=(const partial_die_info& rhs) = delete; > > + /* Adjust the partial die before generating a symbol for it. This > + function may set the is_external flag or change the DIE's > + name. */ > + void fixup (struct dwarf2_cu *cu); > + > /* Offset of this DIE. */ > const sect_offset sect_off; > > @@ -1442,9 +1447,6 @@ struct partial_die_info > /* Flag set if any of the DIE's children are template arguments. */ > unsigned int has_template_arguments : 1; > > - /* Flag set if fixup_partial_die has been called on this die. */ > - unsigned int fixup_called : 1; > - > /* Flag set if DW_TAG_imported_unit uses DW_FORM_GNU_ref_alt. */ > unsigned int is_dwz : 1; > > @@ -1519,10 +1521,13 @@ struct partial_die_info > has_byte_size = 0; > has_const_value = 0; > has_template_arguments = 0; > - fixup_called = 0; > + m_fixup_called = false; > is_dwz = 0; > spec_is_dwz = 0; > } > + > + /* Flag set if fixup has been called on this die. */ > + bool m_fixup_called : 1; > }; Currently, the boolean bits were all together for packing. This moves the bit away from the others, after some pointer fields, I think. This is probably growing the size of the structure with some padding holes. Thanks, Pedro Alves