From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3639 invoked by alias); 11 Feb 2020 10:34:20 -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 3628 invoked by uid 89); 11 Feb 2020 10:34:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f65.google.com Received: from mail-wm1-f65.google.com (HELO mail-wm1-f65.google.com) (209.85.128.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Feb 2020 10:34:18 +0000 Received: by mail-wm1-f65.google.com with SMTP id b17so2853771wmb.0 for ; Tue, 11 Feb 2020 02:34:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+SakCdgNtBoNbQ1KEdTq0hTe/8F4GmrAprufhhBSeg0=; b=Knnj3SwjLplDbM+tEIfKniImOyDw7d/lu+sBRTDDfLvt0kYZORlRW7XG4AS8MZhrN6 LRjofxkZ6lrRK7ibxEboy2nOTGkzT+W64Wn+xOCe9UYavG89AbdUpZ6MnrxtPerGAGnC a8t09B6JjE59ak1sdskj0wAN5BDd9FUhao0P3vS/GOTmtI5VsCAiG0lnC1LeDQIssO04 USp49+OC5FUwA7fYj1tPDcM4edGWMI39gYyQxAx4yZvtOBk8w7MSlT00gJx1vzwY8lmy 5HUslOtNlB/MPRl8mCQwosed/psm6DXy3OB2tqjdzDYrx9yzIsGg2/25ptL/PH/Cm1ma cXGg== Return-Path: Received: from [172.29.6.113] (26.124.146.82.ipv4.evonet.be. [82.146.124.26]) by smtp.gmail.com with ESMTPSA id s22sm3100348wmh.4.2020.02.11.02.34.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2020 02:34:15 -0800 (PST) Subject: Re: [PATCH 5/8] Add per-unit obstack To: Tom Tromey , gdb-patches@sourceware.org References: <20200208152758.29385-1-tom@tromey.com> <20200208152758.29385-6-tom@tromey.com> From: Luis Machado Message-ID: Date: Tue, 11 Feb 2020 10:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200208152758.29385-6-tom@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00375.txt.bz2 On 2/8/20 12:27 PM, Tom Tromey wrote: > This adds an auto_obstack to the DWARF frame comp_unit object, and > then changes the remaining code here to use the comp_unit obstack > rather than the objfile obstack. > > At this point, all the storage for frame data is self-contained -- > that is, it is independent of the objfile. > > gdb/ChangeLog > 2020-02-08 Tom Tromey > > * dwarf2/frame.c (struct comp_unit) : New member. > (decode_frame_entry_1): Use the comp_unit obstack. > > Change-Id: I8a1af090bcc2811762a38afbbea1512be7d952fb > --- > gdb/ChangeLog | 5 +++++ > gdb/dwarf2/frame.c | 7 +++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c > index 0e74b8e7e68..7e1a744513b 100644 > --- a/gdb/dwarf2/frame.c > +++ b/gdb/dwarf2/frame.c > @@ -158,6 +158,9 @@ struct comp_unit > > /* The FDE table. */ > dwarf2_fde_table fde_table; > + > + /* Hold data used by this module. */ > + auto_obstack obstack; > }; > > static struct dwarf2_fde *dwarf2_frame_find_fde (CORE_ADDR *pc, > @@ -1771,7 +1774,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, > if (find_cie (cie_table, cie_pointer)) > return end; > > - cie = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_cie); > + cie = XOBNEW (&unit->obstack, struct dwarf2_cie); > cie->initial_instructions = NULL; > cie->cie_pointer = cie_pointer; > > @@ -1950,7 +1953,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, > if (cie_pointer >= unit->dwarf_frame_size) > return NULL; > > - fde = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_fde); > + fde = XOBNEW (&unit->obstack, struct dwarf2_fde); > fde->cie = find_cie (cie_table, cie_pointer); > if (fde->cie == NULL) > { > LGTM.