gdb: rename "maint agent" functions

Functions agent_eval_command and agent_command are used to implement
maintenance commands, rename them accordingly (with the maint_ prefix),
as well as the agent_command_1 helper function.

Change-Id: Iacf96d4a0a26298e8dd4648a0f38da649ea5ef61
This commit is contained in:
Simon Marchi 2021-12-07 15:56:25 -05:00
parent cd0f67f363
commit c32ce0dc6c

View file

@ -2491,7 +2491,7 @@ agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc)
} }
static void static void
agent_command_1 (const char *exp, int eval) maint_agent_command_1 (const char *exp, int eval)
{ {
/* We don't deal with overlay debugging at the moment. We need to /* We don't deal with overlay debugging at the moment. We need to
think more carefully about this. If you copy this code into think more carefully about this. If you copy this code into
@ -2529,9 +2529,9 @@ agent_command_1 (const char *exp, int eval)
} }
static void static void
agent_command (const char *exp, int from_tty) maint_agent_command (const char *exp, int from_tty)
{ {
agent_command_1 (exp, 0); maint_agent_command_1 (exp, 0);
} }
/* Parse the given expression, compile it into an agent expression /* Parse the given expression, compile it into an agent expression
@ -2539,9 +2539,9 @@ agent_command (const char *exp, int from_tty)
expression. */ expression. */
static void static void
agent_eval_command (const char *exp, int from_tty) maint_agent_eval_command (const char *exp, int from_tty)
{ {
agent_command_1 (exp, 1); maint_agent_command_1 (exp, 1);
} }
/* Parse the given expression, compile it into an agent expression /* Parse the given expression, compile it into an agent expression
@ -2620,7 +2620,7 @@ void _initialize_ax_gdb ();
void void
_initialize_ax_gdb () _initialize_ax_gdb ()
{ {
add_cmd ("agent", class_maintenance, agent_command, add_cmd ("agent", class_maintenance, maint_agent_command,
_("\ _("\
Translate an expression into remote agent bytecode for tracing.\n\ Translate an expression into remote agent bytecode for tracing.\n\
Usage: maint agent [-at LOCATION,] EXPRESSION\n\ Usage: maint agent [-at LOCATION,] EXPRESSION\n\
@ -2628,7 +2628,7 @@ If -at is given, generate remote agent bytecode for this location.\n\
If not, generate remote agent bytecode for current frame pc address."), If not, generate remote agent bytecode for current frame pc address."),
&maintenancelist); &maintenancelist);
add_cmd ("agent-eval", class_maintenance, agent_eval_command, add_cmd ("agent-eval", class_maintenance, maint_agent_eval_command,
_("\ _("\
Translate an expression into remote agent bytecode for evaluation.\n\ Translate an expression into remote agent bytecode for evaluation.\n\
Usage: maint agent-eval [-at LOCATION,] EXPRESSION\n\ Usage: maint agent-eval [-at LOCATION,] EXPRESSION\n\