From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A925385800E; Mon, 30 Aug 2021 14:10:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A925385800E From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/28159] [gdb/symtab] gdb generates .gdb_index with only empty hashtable entries, then fails to recognize it as empty Date: Mon, 30 Aug 2021 14:10:00 +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 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: Mon, 30 Aug 2021 14:10:01 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28159 --- Comment #6 from Tom de Vries --- Committed: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D34daac4b169= da3cb9df3e8bac6347cae630a99dd : [gdb/symtab] Don't write .gdb_index symbol table with empty entries author Tom de Vries =20 Fri, 27 Aug 2021 15:14:49 +0000 (17:14 +0200) committer Tom de Vries =20 Fri, 27 Aug 2021 15:14:49 +0000 (17:14 +0200) commit 34daac4b169da3cb9df3e8bac6347cae630a99dd tree f3ce338b4bd3c8cf74e39c5376a0d20399a96ca8 tree parent 426f7bbfd4179a5b81f87fa324a854c370e4b07a commit | diff [gdb/symtab] Don't write .gdb_index symbol table with empty entries When comparing the sizes of the index files generated for shlib outputs/gdb.dwarf2/dw2-zero-range/shr1.sl, I noticed a large difference between .debug_names: ... $ gdb -q -batch $shlib -ex "save gdb-index -dwarf-5 ." $ du -b -h shr1.sl.debug_names shr1.sl.debug_str 61 shr1.sl.debug_names 0 shr1.sl.debug_str ... and .gdb_index: ... $ gdb -q -batch $shlib -ex "save gdb-index ." $ du -b -h shr1.sl.gdb-index 8.2K shr1.sl.gdb-index ... The problem is that the .gdb_index contains a non-empty symbol table with o= nly empty entries. Fix this by making the symbol table empty, such that we have instead: ... $ du -b -h shr1.sl.gdb-index 184 shr1.sl.gdb-index ... Tested on x86_64-linux. --=20 You are receiving this mail because: You are on the CC list for the bug.=