From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40B1D385BF92; Thu, 2 Apr 2020 23:14:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40B1D385BF92 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/25755] Means to not keep decls in symtab Date: Thu, 02 Apr 2020 23:14:20 +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: enhancement 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 23:14:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25755 --- Comment #3 from Tom de Vries --- I tried out this patch and ran the testsuite: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index f94c66b4f1..3d13e00554 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -20267,6 +20267,8 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, ? cu->get_builder ()->get_global_symbols () : cu->list_in_scope); + suppress_add =3D 1; + SYMBOL_ACLASS_INDEX (sym) =3D LOC_UNRESOLVED; } else if (!die_is_declaration (die, cu)) ... These were the new fails: ... FAIL: gdb.base/symbol-alias.exp: p g_var_s_alias FAIL: gdb.dwarf2/dw2-bad-unresolved.exp: ptype var FAIL: gdb.dwarf2/dw2-bad-unresolved.exp: print var FAIL: gdb.dwarf2/dw2-cu-size.exp: ptype noloc FAIL: gdb.dwarf2/dw2-linkage-name-trust.exp: p c.membername FAIL: gdb.dwarf2/dw2-linkage-name-trust.exp: p c.membername () FAIL: gdb.dwarf2/dw2-noloc.exp: no-run: print file_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-noloc.exp: no-run: ptype file_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-noloc.exp: in-main: print file_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-noloc.exp: in-main: ptype file_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-noloc.exp: print main_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-noloc.exp: ptype main_extern_locno_resolvable FAIL: gdb.dwarf2/dw2-unresolved.exp: print/d var FAIL: gdb.dwarf2/opaque-type-lookup.exp: p variable_a FAIL: gdb.dwarf2/opaque-type-lookup.exp: p variable_b ... --=20 You are receiving this mail because: You are on the CC list for the bug.=