From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4234A3858C2B; Thu, 20 Jul 2023 06:42:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4234A3858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689835358; bh=T0qRv0/aB70XJy9r6VHFWnAVelAfHH4mMReD/xNzQ34=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mPUtq+enb4B/9Egwr/2CNLRbjWl3GueL9rkuhvtGVbn+BcjEczXB1zgn7e2r+Ma4l T7OrIQA+cYg7Fngm0fRnuUzHoQc6f2kYbx3uaU69WWonMNQuXLqE2PGJgoSSaEvdhZ GcOo75uqjP+yJX3SOL8FxOpUXGjP2OogoiuXB0KI= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30656] [gdb/symtab] optimized out static handled inconsistently Date: Thu, 20 Jul 2023 06:42:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30656 --- Comment #1 from Tom de Vries --- Tentative fix: ... $ git diff diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c index 1ebf8f6eed5..3a429fd41b1 100644 --- a/gdb/dwarf2/abbrev.c +++ b/gdb/dwarf2/abbrev.c @@ -162,7 +162,6 @@ abbrev_table::read (struct dwarf2_section_info *section, bool has_specification_or_origin =3D false; bool has_name =3D false; bool has_linkage_name =3D false; - bool has_location =3D false; bool has_external =3D false; /* Now read in declarations. */ @@ -217,11 +216,6 @@ abbrev_table::read (struct dwarf2_section_info *sectio= n, has_linkage_name =3D true; break; - case DW_AT_const_value: - case DW_AT_location: - has_location =3D true; - break; - case DW_AT_sibling: if (is_csize && cur_attr.form =3D=3D DW_FORM_ref4) sibling_offset =3D size; @@ -296,9 +290,6 @@ abbrev_table::read (struct dwarf2_section_info *section, cur_abbrev->interesting =3D false; else if (!tag_interesting_for_index (cur_abbrev->tag)) cur_abbrev->interesting =3D false; - else if (!has_location && !has_specification_or_origin && !has_exter= nal - && cur_abbrev->tag =3D=3D DW_TAG_variable) - cur_abbrev->interesting =3D false; else cur_abbrev->interesting =3D true; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=