]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/symtab] Redo "Fix assert in set_length"
authorTom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Wed, 6 Dec 2023 09:29:17 +0000 (10:29 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 6 Dec 2023 09:29:17 +0000 (10:29 +0100)
commitb17ef9dcd8d16eedf4e60565cd7701698b5a0b6b
tree1ae7eaa7f7fb6a704969fd2f8f87bc6cb15d3ad4
parent3c7666dca52110877863d898a16a79e35e1ddca2
[gdb/symtab] Redo "Fix assert in set_length"

This reverts commit 1c04f72368c ("[gdb/symtab] Fix assert in set_length"), due
to a regression reported in PR29572, and implements a different fix for PR29453.

The fix is to not use the CU table in a .debug_names section to construct
all_units, but instead use create_all_units, and then verify the CU
table from .debug_names.  This also fixes PR25969, so remove the KFAIL.

Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29572
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25969
gdb/dwarf2/read-debug-names.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h
gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp