gdb: move set remote commands to remote.c
Commands "set debug remote" and "set remotetimeout" are defined in cli/cli-cmds.c, I think it would make more sense for them to be in remote.c. gdb/ChangeLog: * cli/cli-cmds.c (show_remote_debug): Remove. (show_remote_timeout): Remove. (_initialize_cli_cmds): Don't register commands. * remote.c (show_remote_debug): Move here. (show_remote_timeout): Move here. (_initialize_remote): Register commands. Change-Id: Ic4d81888aa4f8dde89d1d29397ef19a08951b80b
This commit is contained in:
parent
344e9841d9
commit
baf2b57f18
3 changed files with 45 additions and 36 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* cli/cli-cmds.c (show_remote_debug): Remove.
|
||||||
|
(show_remote_timeout): Remove.
|
||||||
|
(_initialize_cli_cmds): Don't register commands.
|
||||||
|
* remote.c (show_remote_debug): Move here.
|
||||||
|
(show_remote_timeout): Move here.
|
||||||
|
(_initialize_remote): Register commands.
|
||||||
|
|
||||||
2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
|
2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* gdbtypes.h (TYPE_OBJFILE): Remove, change all users to use the
|
* gdbtypes.h (TYPE_OBJFILE): Remove, change all users to use the
|
||||||
|
|
|
@ -2037,23 +2037,6 @@ show_history_expansion_p (struct ui_file *file, int from_tty,
|
||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
show_remote_debug (struct ui_file *file, int from_tty,
|
|
||||||
struct cmd_list_element *c, const char *value)
|
|
||||||
{
|
|
||||||
fprintf_filtered (file, _("Debugging of remote protocol is %s.\n"),
|
|
||||||
value);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
show_remote_timeout (struct ui_file *file, int from_tty,
|
|
||||||
struct cmd_list_element *c, const char *value)
|
|
||||||
{
|
|
||||||
fprintf_filtered (file,
|
|
||||||
_("Timeout limit to wait for target to respond is %s.\n"),
|
|
||||||
value);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_max_user_call_depth (struct ui_file *file, int from_tty,
|
show_max_user_call_depth (struct ui_file *file, int from_tty,
|
||||||
struct cmd_list_element *c, const char *value)
|
struct cmd_list_element *c, const char *value)
|
||||||
|
@ -2455,25 +2438,6 @@ the previous command number shown."),
|
||||||
add_cmd ("configuration", no_set_class, show_configuration,
|
add_cmd ("configuration", no_set_class, show_configuration,
|
||||||
_("Show how GDB was configured at build time."), &showlist);
|
_("Show how GDB was configured at build time."), &showlist);
|
||||||
|
|
||||||
add_setshow_zinteger_cmd ("remote", no_class, &remote_debug, _("\
|
|
||||||
Set debugging of remote protocol."), _("\
|
|
||||||
Show debugging of remote protocol."), _("\
|
|
||||||
When enabled, each packet sent or received with the remote target\n\
|
|
||||||
is displayed."),
|
|
||||||
NULL,
|
|
||||||
show_remote_debug,
|
|
||||||
&setdebuglist, &showdebuglist);
|
|
||||||
|
|
||||||
add_setshow_zuinteger_unlimited_cmd ("remotetimeout", no_class,
|
|
||||||
&remote_timeout, _("\
|
|
||||||
Set timeout limit to wait for target to respond."), _("\
|
|
||||||
Show timeout limit to wait for target to respond."), _("\
|
|
||||||
This value is used to set the time limit for gdb to wait for a response\n\
|
|
||||||
from the target."),
|
|
||||||
NULL,
|
|
||||||
show_remote_timeout,
|
|
||||||
&setlist, &showlist);
|
|
||||||
|
|
||||||
add_basic_prefix_cmd ("debug", no_class,
|
add_basic_prefix_cmd ("debug", no_class,
|
||||||
_("Generic command for setting gdb debugging flags."),
|
_("Generic command for setting gdb debugging flags."),
|
||||||
&setdebuglist, "set debug ", 0, &setlist);
|
&setdebuglist, "set debug ", 0, &setlist);
|
||||||
|
|
36
gdb/remote.c
36
gdb/remote.c
|
@ -14533,6 +14533,23 @@ set_range_stepping (const char *ignore_args, int from_tty,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
show_remote_debug (struct ui_file *file, int from_tty,
|
||||||
|
struct cmd_list_element *c, const char *value)
|
||||||
|
{
|
||||||
|
fprintf_filtered (file, _("Debugging of remote protocol is %s.\n"),
|
||||||
|
value);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
show_remote_timeout (struct ui_file *file, int from_tty,
|
||||||
|
struct cmd_list_element *c, const char *value)
|
||||||
|
{
|
||||||
|
fprintf_filtered (file,
|
||||||
|
_("Timeout limit to wait for target to respond is %s.\n"),
|
||||||
|
value);
|
||||||
|
}
|
||||||
|
|
||||||
void _initialize_remote ();
|
void _initialize_remote ();
|
||||||
void
|
void
|
||||||
_initialize_remote ()
|
_initialize_remote ()
|
||||||
|
@ -15041,6 +15058,25 @@ Specify \"unlimited\" to display all the characters."),
|
||||||
NULL, show_remote_packet_max_chars,
|
NULL, show_remote_packet_max_chars,
|
||||||
&setdebuglist, &showdebuglist);
|
&setdebuglist, &showdebuglist);
|
||||||
|
|
||||||
|
add_setshow_zinteger_cmd ("remote", no_class, &remote_debug, _("\
|
||||||
|
Set debugging of remote protocol."), _("\
|
||||||
|
Show debugging of remote protocol."), _("\
|
||||||
|
When enabled, each packet sent or received with the remote target\n\
|
||||||
|
is displayed."),
|
||||||
|
NULL,
|
||||||
|
show_remote_debug,
|
||||||
|
&setdebuglist, &showdebuglist);
|
||||||
|
|
||||||
|
add_setshow_zuinteger_unlimited_cmd ("remotetimeout", no_class,
|
||||||
|
&remote_timeout, _("\
|
||||||
|
Set timeout limit to wait for target to respond."), _("\
|
||||||
|
Show timeout limit to wait for target to respond."), _("\
|
||||||
|
This value is used to set the time limit for gdb to wait for a response\n\
|
||||||
|
from the target."),
|
||||||
|
NULL,
|
||||||
|
show_remote_timeout,
|
||||||
|
&setlist, &showlist);
|
||||||
|
|
||||||
/* Eventually initialize fileio. See fileio.c */
|
/* Eventually initialize fileio. See fileio.c */
|
||||||
initialize_remote_fileio (&remote_set_cmdlist, &remote_show_cmdlist);
|
initialize_remote_fileio (&remote_set_cmdlist, &remote_show_cmdlist);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue