diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2000-03-28 02:25:14 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@dberlin.org> | 2000-03-28 02:25:14 +0000 |
commit | 5d161b24198e362be0f768e76e6f76bd110d8acb (patch) | |
tree | 7a7095d7ec3ec96b13ce4a232db0a0d2fa8121e5 /gdb/top.c | |
parent | 107b56f053504c0864319ccb6c0f3fef03186fe6 (diff) | |
download | gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.zip gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.tar.gz gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.tar.bz2 |
The set debug changes
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 42 |
1 files changed, 38 insertions, 4 deletions
@@ -144,6 +144,10 @@ static void complete_command PARAMS ((char *, int)); static void do_nothing PARAMS ((int)); +static void show_debug PARAMS ((char *, int)); + +static void set_debug PARAMS ((char *, int)); + #ifdef SIGHUP /* NOTE 1999-04-29: This function will be static again, once we modify gdb to use the event loop as the default command loop and we merge @@ -255,6 +259,10 @@ struct cmd_list_element *setprintlist; struct cmd_list_element *showprintlist; +struct cmd_list_element *setdebuglist; + +struct cmd_list_element *showdebuglist; + struct cmd_list_element *setchecklist; struct cmd_list_element *showchecklist; @@ -3986,7 +3994,24 @@ float_handler (signo) signal (SIGFPE, float_handler); error ("Erroneous arithmetic operation."); } - + +static void +set_debug (arg, from_tty) + char *arg; + int from_tty; +{ + printf_unfiltered ( + "\"set debug\" must be followed by the name of a print subcommand.\n"); + help_list (setdebuglist, "set debug ", -1, gdb_stdout); +} + +static void +show_debug (args, from_tty) + char *args; + int from_tty; +{ + cmd_show_list (showdebuglist, from_tty, ""); +} static void init_cmd_lists () @@ -4313,12 +4338,18 @@ This value is used to set the speed of the serial port when debugging\n\ using remote targets.", &setlist), &showlist); + c = add_set_cmd("remotedebug", no_class, var_zinteger, (char *) &remote_debug, "Set debugging of remote protocol.\n\ +When enabled, each packet sent or received with the remote target\n\ +is displayed.",&setlist); + deprecate_cmd(c,"set debug remote"); + deprecate_cmd(add_show_from_set(c,&showlist),"show debug remote"); + add_show_from_set ( - add_set_cmd ("remotedebug", no_class, var_zinteger, (char *) &remote_debug, + add_set_cmd ("remote", no_class, var_zinteger, (char *) &remote_debug, "Set debugging of remote protocol.\n\ When enabled, each packet sent or received with the remote target\n\ -is displayed.", &setlist), - &showlist); +is displayed.", &setdebuglist), + &showdebuglist); add_show_from_set ( add_set_cmd ("remotetimeout", no_class, var_integer, (char *) &remote_timeout, @@ -4358,4 +4389,7 @@ from the target.", &setlist), Use \"on\" to enable the notification, and \"off\" to disable it.", &setlist), &showlist); } + add_prefix_cmd("debug",no_class,set_debug, "Generic command for setting gdb debugging flags", &setdebuglist, "set debug ", 0, &setlist); + + add_prefix_cmd("debug",no_class,show_debug,"Generic command for showing gdb debugging flags", &showdebuglist, "show debug ", 0, &showlist); } |