From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33197 invoked by alias); 16 Jan 2018 16:00:55 -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 32934 invoked by uid 89); 16 Jan 2018 16:00:33 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=improves X-HELO: mail-qt0-f170.google.com Received: from mail-qt0-f170.google.com (HELO mail-qt0-f170.google.com) (209.85.216.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jan 2018 16:00:28 +0000 Received: by mail-qt0-f170.google.com with SMTP id s3so18792126qtb.10 for ; Tue, 16 Jan 2018 08:00:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cAikyjAdTjfRvQd9N4gQ4iP82emBnHUxzcdsSFmGfC8=; b=BB4F48G391lGrbnVbh9mtZpkV0BQv7vLLMrYvBuzxZuoF35N75nAOrkBwaQYSWqNdm AisRtFkt7N7lse198YjH9qOuisO1TGMXCmq9OrkJmJmeb0h4TgKKCsdBfzMidYphleEN erxYrrRKjduBnXBxvbtsSf7ZDPMmd8sXRa8Unx0o2wQjrNsxp8hR8o+dreOnpEGa6gfP 7hyZg+HvLSlmU8pbGONKfrc3DzbQPBmSVJvIce8JgmzofHqad7ZzCgYO+bXTtwCvpA+N zZJO7YgLGK0UZE5AQd0xVhZWexNhIcg5xsqFAMM5p44WgV25xnfWqe7yk5uu73ztE5Nj weLQ== X-Gm-Message-State: AKwxytf0RM1wn2WYcViWxqhVWUHgQK+kMo3fXJWlvgGxLLeusrP3p2o3 2twRB7LhHU75FmuKTJq7pDjr3ipE11/aVelDkME= X-Google-Smtp-Source: ACJfBotlaTmZsCkGFdqBs3hTee+s4Zt8SYlTEIfQ6mZKDHJWn/o+Y86X2Lta61diagzfqh4VxIcnah4QTO4Fmf1UDZY= X-Received: by 10.200.67.75 with SMTP id a11mr36730435qtn.197.1516118420049; Tue, 16 Jan 2018 08:00:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.152.176 with HTTP; Tue, 16 Jan 2018 08:00:19 -0800 (PST) In-Reply-To: <87mv1lisjj.fsf@tromey.com> References: <20180106002621.21099-1-tom@tromey.com> <20180106002621.21099-6-tom@tromey.com> <86wp0pg95s.fsf@gmail.com> <87mv1lisjj.fsf@tromey.com> From: Yao Qi Date: Tue, 16 Jan 2018 16:00:00 -0000 Message-ID: Subject: Re: [RFA 5/6] Remove objfile argument from add_dyn_prop To: Tom Tromey Cc: GDB Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00302.txt.bz2 On Wed, Jan 10, 2018 at 4:32 PM, Tom Tromey wrote: >>>>>> "Yao" =3D=3D Yao Qi writes: > > Yao> Tom Tromey writes: >>> @@ -25116,7 +25116,7 @@ set_die_type (struct die_info *die, struct type= *type, struct dwarf2_cu *cu) >>> if (attr_form_is_block (attr)) >>> { >>> if (attr_to_dynamic_prop (attr, die, cu, &prop)) >>> - add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile); >>> + add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); >>> } > > Yao> Before the patch, the objfile is > Yao> cu-> per_cu->dwarf2_per_objfile->objfile, but after the patch, the > Yao> objfile is TYPE_OBJFILE (type), are they equivalent? > > If they were not the same, then that was already a bug, because > types generally have the restriction that they can only point to static > data or to other objects allocated on the same objfile. Cross-objfile > pointers are not allowed, to avoid dangling pointers when an objfile is > destroyed. > > Now, a given invocation of the DWARF reader generally deals with a > single objfile. So I believe they were the same. But if they were not, > then this patch actually improves the situation. > OK, patch is good to me then. --=20 Yao (=E9=BD=90=E5=B0=A7)