aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmds.c
diff options
context:
space:
mode:
authorJan Vrany <jan.vrany@labware.com>2021-11-08 14:00:13 +0000
committerAndrew Burgess <aburgess@redhat.com>2021-12-14 11:41:42 +0000
commit788ec57f0a43261ced1f63dda68c224824d1f16d (patch)
treecf5fde90ecba484fe983d3ff1ca14b32e29d1c65 /gdb/mi/mi-cmds.c
parent1f6c8c3317e5692e9994c18f427b45093863d572 (diff)
downloadbinutils-788ec57f0a43261ced1f63dda68c224824d1f16d.zip
binutils-788ec57f0a43261ced1f63dda68c224824d1f16d.tar.gz
binutils-788ec57f0a43261ced1f63dda68c224824d1f16d.tar.bz2
gdb/mi: rename mi_cmd to mi_command
Just give this class a new name, more inline with the name of the sub-classes. I've also updated mi_cmd_up to mi_command_up in mi-cmds.c inline with this new naming scheme. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/mi/mi-cmds.c')
-rw-r--r--gdb/mi/mi-cmds.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 58892fe..9c11db0 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -28,22 +28,22 @@
/* A command held in the MI_CMD_TABLE. */
-using mi_cmd_up = std::unique_ptr<struct mi_cmd>;
+using mi_command_up = std::unique_ptr<struct mi_command>;
/* MI command table (built at run time). */
-static std::map<std::string, mi_cmd_up> mi_cmd_table;
+static std::map<std::string, mi_command_up> mi_cmd_table;
/* MI command with a pure MI implementation. */
-struct mi_command_mi : public mi_cmd
+struct mi_command_mi : public mi_command
{
- /* Constructor. For NAME and SUPPRESS_NOTIFICATION see mi_cmd
+ /* Constructor. For NAME and SUPPRESS_NOTIFICATION see mi_command
constructor, FUNC is the function called from do_invoke, which
implements this MI command. */
mi_command_mi (const char *name, mi_cmd_argv_ftype func,
int *suppress_notification)
- : mi_cmd (name, suppress_notification),
+ : mi_command (name, suppress_notification),
m_argv_function (func)
{
gdb_assert (func != nullptr);
@@ -72,9 +72,9 @@ private:
/* MI command implemented on top of a CLI command. */
-struct mi_command_cli : public mi_cmd
+struct mi_command_cli : public mi_command
{
- /* Constructor. For NAME and SUPPRESS_NOTIFICATION see mi_cmd
+ /* Constructor. For NAME and SUPPRESS_NOTIFICATION see mi_command
constructor, CLI_NAME is the name of a CLI command that should be
invoked to implement this MI command. If ARGS_P is true then any
arguments from entered by the user as part of the MI command line are
@@ -82,7 +82,7 @@ struct mi_command_cli : public mi_cmd
false, nullptr is send to CLI_NAME as its argument string. */
mi_command_cli (const char *name, const char *cli_name, bool args_p,
int *suppress_notification)
- : mi_cmd (name, suppress_notification),
+ : mi_command (name, suppress_notification),
m_cli_name (cli_name),
m_args_p (args_p)
{ /* Nothing. */ }
@@ -114,7 +114,7 @@ private:
COMMAND was added to mi_cmd_table. */
static bool
-insert_mi_cmd_entry (mi_cmd_up command)
+insert_mi_cmd_entry (mi_command_up command)
{
gdb_assert (command != nullptr);
@@ -135,8 +135,8 @@ static void
add_mi_cmd_mi (const char *name, mi_cmd_argv_ftype function,
int *suppress_notification = nullptr)
{
- mi_cmd_up command (new mi_command_mi (name, function,
- suppress_notification));
+ mi_command_up command (new mi_command_mi (name, function,
+ suppress_notification));
bool success = insert_mi_cmd_entry (std::move (command));
gdb_assert (success);
@@ -150,8 +150,8 @@ static void
add_mi_cmd_cli (const char *name, const char *cli_name, int args_p,
int *suppress_notification = nullptr)
{
- mi_cmd_up command (new mi_command_cli (name, cli_name, args_p != 0,
- suppress_notification));
+ mi_command_up command (new mi_command_cli (name, cli_name, args_p != 0,
+ suppress_notification));
bool success = insert_mi_cmd_entry (std::move (command));
gdb_assert (success);
@@ -159,7 +159,7 @@ add_mi_cmd_cli (const char *name, const char *cli_name, int args_p,
/* See mi-cmds.h. */
-mi_cmd::mi_cmd (const char *name, int *suppress_notification)
+mi_command::mi_command (const char *name, int *suppress_notification)
: m_name (name),
m_suppress_notification (suppress_notification)
{
@@ -169,7 +169,7 @@ mi_cmd::mi_cmd (const char *name, int *suppress_notification)
/* See mi-cmds.h. */
void
-mi_cmd::invoke (struct mi_parse *parse) const
+mi_command::invoke (struct mi_parse *parse) const
{
gdb::optional<scoped_restore_tmpl<int>> restore
= do_suppress_notification ();
@@ -179,7 +179,7 @@ mi_cmd::invoke (struct mi_parse *parse) const
/* See mi-cmds.h. */
gdb::optional<scoped_restore_tmpl<int>>
-mi_cmd::do_suppress_notification () const
+mi_command::do_suppress_notification () const
{
if (m_suppress_notification != nullptr)
return scoped_restore_tmpl<int> (m_suppress_notification, 1);
@@ -353,7 +353,7 @@ build_table ()
/* See mi-cmds.h. */
-struct mi_cmd *
+mi_command *
mi_cmd_lookup (const char *command)
{
gdb_assert (command != nullptr);