From 0f8e2034128e4a73e02cb8311eeeea7e886a5985 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 25 Jun 2021 21:35:40 -0400 Subject: gdb: add context getter/setter to cmd_list_element Straightforward replacement of get_cmd_context / set_cmd_context with cmd_list_element methods. gdb/ChangeLog: * cli/cli-decode.h (struct cmd_list_element) : New. : Rename to... : ... this. * cli/cli-decode.c (set_cmd_context, get_cmd_context): Remove. * command.h (set_cmd_context, get_cmd_context): Remove, use cmd_list_element::set_context and cmd_list_element::context everywhere instead. Change-Id: I5016b0079014e3f17d1aa449ada7954473bf2b5d --- gdb/break-catch-throw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gdb/break-catch-throw.c') diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index 7fc6953..f05c2f8 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -36,6 +36,7 @@ #include "gdb_regex.h" #include "cp-support.h" #include "location.h" +#include "cli/cli-decode.h" /* Each spot where we may place an exception-related catchpoint has two names: the SDT probe point and the function name. This @@ -456,7 +457,7 @@ static void catch_catch_command (const char *arg, int from_tty, struct cmd_list_element *command) { - bool tempflag = get_cmd_context (command) == CATCH_TEMPORARY; + bool tempflag = command->context () == CATCH_TEMPORARY; catch_exception_event (EX_EVENT_CATCH, arg, tempflag, from_tty); } @@ -467,7 +468,7 @@ static void catch_throw_command (const char *arg, int from_tty, struct cmd_list_element *command) { - bool tempflag = get_cmd_context (command) == CATCH_TEMPORARY; + bool tempflag = command->context () == CATCH_TEMPORARY; catch_exception_event (EX_EVENT_THROW, arg, tempflag, from_tty); } @@ -478,7 +479,7 @@ static void catch_rethrow_command (const char *arg, int from_tty, struct cmd_list_element *command) { - bool tempflag = get_cmd_context (command) == CATCH_TEMPORARY; + bool tempflag = command->context () == CATCH_TEMPORARY; catch_exception_event (EX_EVENT_RETHROW, arg, tempflag, from_tty); } -- cgit v1.1