From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 340853858D38; Sun, 17 Sep 2023 07:13:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 340853858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694934799; bh=13Bw6sRoQn1vBA1mz3fZ96TfMNpwCd/hpecB+GwhLHQ=; h=From:To:Subject:Date:From; b=PayYUGdW8lg7uR+F2ATpsDEyCTnm7USQ/etf0Ybw6WEnX8k0y6nqgg2ohvbPvl6D6 eB7GLjG+QprsXbJ745jhuW2I95Ei44BcExW+xJCuSaQ2I1IjBJFjQt+/Sn54i8ttUz munJ3CeXIADW5YMITuSbE75o8SA61MYQ73vxMi5k= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30863] New: [gdb/symtab] PU without import ignored in cooked index Date: Sun, 17 Sep 2023 07:13:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30863 Bug ID: 30863 Summary: [gdb/symtab] PU without import ignored in cooked index Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- [ This is with an updated version of the patch series submitted here ( https://sourceware.org/pipermail/gdb-patches/2023-August/201887.html ). ] Consider the exec of test-case gdb.dwarf2/imported-unit-runto-main.exp, bef= ore adding the .gdb_index section. It has a backward inter-cu intra-shard reference: ... $ gdb -q -batch -iex "maint set worker-threads 0" imported-unit-runto-main handle_deferred_entries, intra-shard case parent map 0x00000000000000fb 0x2935500 (deferred) 0x00000000000000fc 0x0 parent valid map 0x000000000000002e 0x1 0x0000000000000045 0x0 0x0000000000000062 0x1 0x0000000000000084 0x0 0x00000000000000fb 0x1 0x0000000000000111 0x0 0x0000000000000149 0x1 0x00000000000002d4 0x0 handle_deferred_entries, inter-shard case 0x00000000000000fb 0x2935500 (deferred) 0x00000000000000fc 0x0 Resolve deferred: 0xfb -> 0xd5: no parent ... The dependency is resolved in the inter-shard case, which assumes that all = CUs have been processed, and consequently doesn't check the parent valid map. But if we look at the parent valid map, we don't find 0xd5. So the "no par= ent" is not a case of, we've processed 0xd5 and found that is has no parent, but we've not processed the PU containing 0xd5. The problem is that we have a PU without import, and consequently no CU wins the race to read it. This doesn't cause a problem with the current implementation (because "not processed" and "no parent" look the same), but we can reproduce the same problem with test-case forward-spec-inter-cu.exp. By changing one of the cus into a pu: ... --- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp @@ -48,7 +48,7 @@ Dwarf::assemble $asm_file { } cu {} { - DW_TAG_compile_unit { + DW_TAG_partial_unit { {DW_AT_language @DW_LANG_C_plus_plus} } { declare_labels myint ... we get: ... FAIL: gdb.dwarf2/forward-spec-inter-cu.exp: v has a parent ... --=20 You are receiving this mail because: You are on the CC list for the bug.=