]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix crash in struct-with-sig-2.exp with debug-names target board
authorTom Tromey <tom@tromey.com>
Wed, 17 Jan 2024 02:10:12 +0000 (19:10 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jan 2024 13:15:27 +0000 (06:15 -0700)
commit2002c0099f9fb4d737930acd66733cfad39f68f1
tree19e63022a60746f6e616318ea3968365b7328248
parent8061bf5faa8540a77fab8156ae1da816ac0e3c33
Fix crash in struct-with-sig-2.exp with debug-names target board

When I run the struct-with-sig-2.exp test with the .debug_names-using
target board, I see a gdb crash.  This happens because the reader
throws an exception without calling finalize_all_units.  This causes
an assertion failure later because the number of CUs and TUs doesn't
match.

The fix is to clear 'all_units' on failure.

Approved-By: Tom de Vries <tdevries@suse.de>
gdb/dwarf2/read.c