From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F3E84385040E; Thu, 27 May 2021 09:57:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3E84385040E From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/27920] New: [gdb/testsuite] hardcoding -readnow skips testing of partial symbols Date: Thu, 27 May 2021 09:57:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: 10.1 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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, 27 May 2021 09:57:35 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27920 Bug ID: 27920 Summary: [gdb/testsuite] hardcoding -readnow skips testing of partial symbols Product: gdb Version: 10.1 Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I looked into test-case gdb.dwarf2/dw2-icycle.exp, and found: ... if { [prepare_for_testing "failed to prepare" ${testfile} \ [list $srcfile $srcfile2] {nodebug}] } { return -1 } # We are trying to verify that the partial symtab to symtab expansion # for the debugging info hand-coded in our assembly file does not cause # the debugger to crash (infinite recursion). To facilitate the test, # start the debugger with -readnow. This force expansion as soon as # the objfile is loaded.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 set saved_gdbflags $GDBFLAGS set GDBFLAGS "$GDBFLAGS -readnow" clean_restart ${testfile} set GDBFLAGS $saved_gdbflags ... There seems to be a mismatch between comment and code. It's true that -readnow forces full symtabs to be generated. But it specifically skips expansion from partial symtab to full symtab. I we want to exercise that path, we should use "maint expand-symtabs" inste= ad. Generally, hardcoding -readnow in test-cases is undesirable because it skips testing the default way of handling things in gdb using partial symtabs. Testing readnow can be done using the target board. And if we really want a test-case to be tested with readnow with any target board we can f.i. add -readnow.exp variant (see gdb.base/list-ambiguous-readnow.exp). There are also test-cases that internally iterate over different loading modes like partial-syms/readnow/index. I did a first scan in gdb.dwarf2/*.exp, removing -readnow from test-cases, = and ran into PR27919. --=20 You are receiving this mail because: You are on the CC list for the bug.=