diff options
author | Tom Tromey <tromey@adacore.com> | 2022-08-17 11:47:17 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-09-12 14:25:06 -0600 |
commit | 5f48d886a9ce0b7d109a26c860adf66330ca65cf (patch) | |
tree | 27ac0194e55feb3eb8a4a1ea9541fa4cec0c6652 /gdb/tracepoint.c | |
parent | 29a6701e530a4119d3c0d261da2b7b24034c9233 (diff) | |
download | fsf-binutils-gdb-5f48d886a9ce0b7d109a26c860adf66330ca65cf.zip fsf-binutils-gdb-5f48d886a9ce0b7d109a26c860adf66330ca65cf.tar.gz fsf-binutils-gdb-5f48d886a9ce0b7d109a26c860adf66330ca65cf.tar.bz2 |
Use checked_static_cast in more places
I went through all the uses of dynamic_cast<> in gdb, looking for ones
that could be replaced with checked_static_cast. This patch is the
result. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 75ac0ce..dfb62dc 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -687,7 +687,7 @@ validate_actionline (const char *line, struct breakpoint *b) { symbol *sym; expr::var_value_operation *vvop - = (dynamic_cast<expr::var_value_operation *> + = (gdb::checked_static_cast<expr::var_value_operation *> (exp->op.get ())); sym = vvop->get_symbol (); @@ -1357,7 +1357,7 @@ encode_actions_1 (struct command_line *action, case OP_REGISTER: { expr::register_operation *regop - = (dynamic_cast<expr::register_operation *> + = (gdb::checked_static_cast<expr::register_operation *> (exp->op.get ())); const char *name = regop->get_name (); @@ -1380,7 +1380,7 @@ encode_actions_1 (struct command_line *action, tempval = evaluate_expression (exp.get ()); addr = value_address (tempval); expr::unop_memval_operation *memop - = (dynamic_cast<expr::unop_memval_operation *> + = (gdb::checked_static_cast<expr::unop_memval_operation *> (exp->op.get ())); struct type *type = memop->get_type (); /* Initialize the TYPE_LENGTH if it is a typedef. */ @@ -1397,7 +1397,7 @@ encode_actions_1 (struct command_line *action, case OP_VAR_VALUE: { expr::var_value_operation *vvo - = (dynamic_cast<expr::var_value_operation *> + = (gdb::checked_static_cast<expr::var_value_operation *> (exp->op.get ())); struct symbol *sym = vvo->get_symbol (); const char *name = sym->natural_name (); |