aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-05-19 13:55:41 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-07-21 15:19:43 +0100
commitc44885db3b56c83a12e88a176c03f2a2268428b8 (patch)
tree9228ea030e570e4eea98ac41939b296a6a61971c /bfd/elf32-i386.c
parent11da1b13b313ae46c84008ebf096ffed1701e3c1 (diff)
downloadfsf-binutils-gdb-c44885db3b56c83a12e88a176c03f2a2268428b8.zip
fsf-binutils-gdb-c44885db3b56c83a12e88a176c03f2a2268428b8.tar.gz
fsf-binutils-gdb-c44885db3b56c83a12e88a176c03f2a2268428b8.tar.bz2
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 'bfd/elf32-i386.c')
0 files changed, 0 insertions, 0 deletions