gdb: use gdb::checked_static_cast when casting lm_info
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 10 Oct 2023 18:03:18 +0000 (14:03 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 19 Oct 2023 14:57:51 +0000 (10:57 -0400)
commit3fcbae9d9c7cdc4103c4f494f5d3c63b373617ee
tree1b9c686e8c012c529b370245beb56262fde7f8bc
parente3b63a7910ac7a4ee959af20a544075becbf2671
gdb: use gdb::checked_static_cast when casting lm_info

Now that the lm_info class hierarchy has a virtual destructor and
therefore a vtable, use checked_static_cast instead of C-style cases to
ensure (when building in dev mode) that we're casting to the right kind
of lm_info.

Change-Id: I9a99b7d6aa9a44edbe76377d57a7008cfb75a744
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
gdb/nto-tdep.c
gdb/solib-aix.c
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-rocm.c
gdb/solib-svr4.c
gdb/solib-target.c