]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/block: add assert in block_iterator::compunit_symtab
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 6 Feb 2026 02:52:31 +0000 (21:52 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 6 Feb 2026 19:02:24 +0000 (14:02 -0500)
commit8f0eb8d61e7b1f2a17f3f09deb411b75eb531f5c
treee7ead8222d557235f1e0ba5ae0de336dd12bed61
parent8a678aea6d36dbf77a93c89adf5f4c7fc9e20249
gdb/block: add assert in block_iterator::compunit_symtab

Verify that the compunit is only accessed when the iterator is in the
mode where that field makes sense.

We could also set compunit_symtab_ even in "single block" mode, it
wouldn't hurt, but it would not be useful either.

Change-Id: I237db16bb485148f9e906b2e7238159e9f0a8585
Approved-By: Tom Tromey <tom@tromey.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Tested-By: Guinevere Larsen <guinevere@redhat.com>
gdb/block.c