diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-05-19 13:55:41 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-07-21 15:19:43 +0100 |
commit | c44885db3b56c83a12e88a176c03f2a2268428b8 (patch) | |
tree | 9228ea030e570e4eea98ac41939b296a6a61971c /ld/emulparams/alphavms.sh | |
parent | 11da1b13b313ae46c84008ebf096ffed1701e3c1 (diff) | |
download | binutils-gdb-c44885db3b56c83a12e88a176c03f2a2268428b8.tar.gz |
gdb: ensure the cast in gdbarch_tdep is valid
This commit makes use of gdb::checked_static_cast when casting the
generic gdbarch_tdep pointer to a specific sub-class type. This means
that, when compiled in developer mode, GDB will validate that the cast
is correct.
In order to use gdb::checked_static_cast the types involved must have
RTTI, which is why the gdbarch_tdep base class now has a virtual
destructor.
Assuming there are no bugs in GDB where we cast a gdbarch_tdep pointer
to the wrong type, then there should be no changes after this commit.
If any bugs do exist, then GDB will now assert (in a developer build).
Diffstat (limited to 'ld/emulparams/alphavms.sh')
0 files changed, 0 insertions, 0 deletions