aboutsummaryrefslogtreecommitdiff
path: root/gdb/nto-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-10-10 14:03:18 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commit3fcbae9d9c7cdc4103c4f494f5d3c63b373617ee (patch)
tree1b9c686e8c012c529b370245beb56262fde7f8bc /gdb/nto-tdep.c
parente3b63a7910ac7a4ee959af20a544075becbf2671 (diff)
downloadgdb-3fcbae9d9c7cdc4103c4f494f5d3c63b373617ee.zip
gdb-3fcbae9d9c7cdc4103c4f494f5d3c63b373617ee.tar.gz
gdb-3fcbae9d9c7cdc4103c4f494f5d3c63b373617ee.tar.bz2
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>
Diffstat (limited to 'gdb/nto-tdep.c')
-rw-r--r--gdb/nto-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 1d9c734..67e3c70 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -247,7 +247,7 @@ nto_parse_redirection (char *pargv[], const char **pin, const char **pout,
static CORE_ADDR
lm_addr (const so_list &so)
{
- const lm_info_svr4 *li = (const lm_info_svr4 *) so.lm_info;
+ auto *li = gdb::checked_static_cast<const lm_info_svr4 *> (so.lm_info);
return li->l_addr;
}