aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-15 12:05:57 -0600
committerTom Tromey <tromey@adacore.com>2023-09-19 08:14:00 -0600
commit01bccc56af0f590c5ff64c24dea17fa3098572d7 (patch)
tree074de314632fb602e0055b1173a2756c90a1d617 /gdb/mi
parentbcafd1c19e628d831cf3eb20229c42ad9db4b29c (diff)
downloadgdb-01bccc56af0f590c5ff64c24dea17fa3098572d7.zip
gdb-01bccc56af0f590c5ff64c24dea17fa3098572d7.tar.gz
gdb-01bccc56af0f590c5ff64c24dea17fa3098572d7.tar.bz2
Use gdb::checked_static_cast for tracepoints
This replaces some casts to 'tracepoint *' with checked_static_cast. Some functions are changed to accept a 'tracepoint *' now, for better type safety. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-break.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 975bc1c..44835c7 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -585,11 +585,14 @@ mi_cmd_break_commands (const char *command, const char *const *argv, int argc)
};
if (is_tracepoint (b))
- break_command = read_command_lines_1 (reader, 1,
- [=] (const char *line)
+ {
+ tracepoint *t = gdb::checked_static_cast<tracepoint *> (b);
+ break_command = read_command_lines_1 (reader, 1,
+ [=] (const char *line)
{
- validate_actionline (line, b);
+ validate_actionline (line, t);
});
+ }
else
break_command = read_command_lines_1 (reader, 1, 0);