From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 605A5385DC26 for ; Thu, 30 Apr 2020 19:24:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 605A5385DC26 Received: by mail-ot1-x32b.google.com with SMTP id m13so563736otf.6 for ; Thu, 30 Apr 2020 12:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FuI1TpQWxjKsOfMFq6OPk16JNVbyY+52e05qRbiemZA=; b=l4neExjM4QR5IjxNJXSHQWXoCqhEUfFF2allD/OMlTLkcTc4UMjeC8FDYY09h3bR3p JAtZDZr5jBT8Pj2bYXwHGa1Iwl9Tn6wMCmHlFn7ijIF3YT1NE9W+da75Bnj/IjBegHs/ donVb2rHtZoo7dJoa6ePMu4WQszijDra+09PDyP5e8VEtpcAs+MiAmGzGd70LXHPkF/h iTPRmpTIBkHpkma+tYGEWC2e6ifVctQtWc4Jp4DO3ZajeVo/Wh2sxiZt64ppoStICrcs k1AYona6tbSTYYX1bqMOZ0GV5JBWp1v2+hHPIeERIWijzmkdkbsyslbmv0gjke3PVHb+ un+A== X-Gm-Message-State: AGi0Pubd8/q+IN2hUZmVJjDQVLN0sP62I1Ff4s23lDuEg+h/oJ4q0aIx 6yiB+NYPC/5Y3lFVSrKlBxviAQ8N42MGfUiQVKo= X-Google-Smtp-Source: APiQypILV6ilylllfhsXEg96ZF1uW+soTGmSSI0dGbKP5tvvvEO5jaJWL5pCVtH8RhbrBdnEQoz6zr1Fb7owa64sppE= X-Received: by 2002:a9d:7645:: with SMTP id o5mr571579otl.272.1588274692675; Thu, 30 Apr 2020 12:24:52 -0700 (PDT) MIME-Version: 1.0 References: <41d74a1a-0748-4a40-6365-011ac0c2a2ff@polymtl.ca> <725b0ecd-7cfe-b93e-f9c8-953fca8c2502@suse.de> <20200430132427.GM3522@embecosm.com> In-Reply-To: From: Eric Christopher Date: Thu, 30 Apr 2020 12:24:36 -0700 Message-ID: Subject: Re: Recent commit in binutils-gdb To: Tom de Vries Cc: Andrew Burgess , Sterling Augustine , gdb-patches , Simon Marchi X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 19:24:54 -0000 Thanks for the revert. Sorry for any trouble it caused :) -eric On Thu, Apr 30, 2020 at 10:01 AM Tom de Vries wrote: > On 30-04-2020 15:24, Andrew Burgess wrote: > > * Tom de Vries [2020-04-30 07:49:56 +0200]: > > > >> On 30-04-2020 06:10, Sterling Augustine via Gdb-patches wrote: > >>> The commit was proposed here: > >>> > >>> https://sourceware.org/pipermail/gdb/2020-March/000012.html > >>> > >> > >> With reproducer: > >> ... > >> $ cat b.cpp > >> namespace hide { struct Bar { int y; }; } > >> struct Foo { hide::Bar* b; }; > >> > >> inline void x() { hide::Bar b; } > >> > >> static Foo aFoo; > >> > >> void * f() { > >> return aFoo.b; > >> } > >> > >> int main() { > >> f(); > >> return 0; > >> } > >> $ g++ -fdebug-types-section b.cpp -g > >> $ ./build/gdb/gdb -ex "b f" -ex run -ex "ptype hide::Bar" ./a.out > >> ... > >> > >> I can reproduce this problem before the recent commit 770479f223e "gdb: > >> Fix toplevel types with -fdebug-types-section", but not after. > >> > >> Also, when I revert commit 770479f223e, and leave this one in place, it > >> doesn't fix the problem. That seems to be because the proposed commit: > >> ... > >> @@ -10954,6 +10954,7 @@ dwarf2_cu::setup_type_unit_groups (struct > >> die_info *die) > >> compunit_language (cust), > >> 0, cust)); > >> > >> + list_in_scope = get_builder ()->get_file_symbols (); > >> auto &file_names = line_header->file_names (); > >> for (i = 0; i < file_names.size (); ++i) > >> { > >> ... > >> and the actual commit differ (note the different in context before): > >> ... > >> @@ -10942,6 +10942,7 @@ dwarf2_cu::setup_type_unit_groups (struct > >> die_info *die) > >> = XOBNEWVEC (&COMPUNIT_OBJFILE (cust)->objfile_obstack, > >> struct symtab *, line_header->file_names_size ()); > >> > >> + list_in_scope = get_builder ()->get_file_symbols (); > >> auto &file_names = line_header->file_names (); > >> for (i = 0; i < file_names.size (); ++i) > >> { > >> ... > >> > >> In summary, the problem was fixed by an earlier commit, and this commit > >> was misapplied. I think we should probably revert this one. > > > > FWIW I agree. > > Andrew, thanks for the input, I've now reverted the patch. > > Guys, my apologies for how this went. A patch for this problem was > approved in Januari, but lingered around uncommitted, leading to > duplicated work. We'll try to do better. > > Thanks, > - Tom >