aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-26 14:53:06 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-26 14:53:06 +0000
commitcb1a6d5f515a44ffcdc3bbf20c2e01ee8a37670d (patch)
treeebb4f31c73e8b43bd3ae35561d46d6887510f438 /gdb/cli
parentc05e9f04ff9e967a5833cd6780759710cb3c3036 (diff)
downloadgdb-cb1a6d5f515a44ffcdc3bbf20c2e01ee8a37670d.zip
gdb-cb1a6d5f515a44ffcdc3bbf20c2e01ee8a37670d.tar.gz
gdb-cb1a6d5f515a44ffcdc3bbf20c2e01ee8a37670d.tar.bz2
2004-07-26 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (deprecated_add_show_from_set): Deprecate. * xcoffsolib.c (_initialize_xcoffsolib): Update. * wince.c (_initialize_wince): Update. * win32-nat.c (_initialize_win32_nat): Update. * varobj.c (_initialize_varobj): Update. * valops.c (_initialize_valops): Update. * utils.c (initialize_utils, initialize_utils): Update. * tui/tui-win.c (_initialize_tui_win): Update. * top.c (init_main): Update. * symfile.c (_initialize_symfile): Update. * source.c (_initialize_source): Update. * somsolib.c (_initialize_som_solib): Update. * solib.c (_initialize_solib): Update. * solib-frv.c (_initialize_frv_solib): Update. * serial.c (_initialize_serial): Update. * ser-go32.c (_initialize_ser_dos, _initialize_ser_dos): Update. * remote.c (_initialize_remote, _initialize_remote): Update. * remote-vx.c (_initialize_vx): Update. * remote-utils.c (_initialize_sr_support): Update. * remote-sds.c (_initialize_remote_sds): Update. * remote-mips.c (_initialize_remote_mips): Update. * remote-e7000.c (_initialize_remote_e7000): Update. * proc-api.c (_initialize_proc_api): Update. * printcmd.c: Update. * parse.c (_initialize_parse): Update. * pa64solib.c (_initialize_pa64_solib): Update. * p-valprint.c (_initialize_pascal_valprint): Update. * monitor.c (_initialize_remote_monitors): Update. * mips-tdep.c (_initialize_mips_tdep): Update. * mcore-tdep.c (_initialize_mcore_tdep): Update. * maint.c (_initialize_maint_cmds): Update. * lin-lwp.c (_initialize_lin_lwp): Update. * language.c (_initialize_language): Update. * kod.c (_initialize_kod): Update. * infrun.c (set_schedlock_func, _initialize_infrun): Update. * i386-tdep.c (_initialize_i386_tdep): Update. * gdbtypes.c (build_gdbtypes, _initialize_gdbtypes): Update. * gdbarch.sh: Update. * gdbarch.c: Re-generate. * gdb-events.sh: Update. * gdb-events.c: Re-generate. * frame.c (_initialize_frame): Update. * exec.c: Update. * demangle.c (_initialize_demangler): Update. * dcache.c (_initialize_dcache): Update. * cris-tdep.c (_initialize_cris_tdep, cris_version_update): Update. * cp-valprint.c (_initialize_cp_valprint): Update. * corefile.c (_initialize_core): Update. * command.h: Update. * cli/cli-decode.h: Update. * cli/cli-cmds.c (init_cli_cmds): Update. * charset.c (_initialize_charset): Update. * breakpoint.c (_initialize_breakpoint): Update. * arm-tdep.c (_initialize_arm_tdep_initialize_arm_tdep): Update. * alpha-tdep.c (_initialize_alpha_tdep): Update. * aix-thread.c (_initialize_aix_thread): Update.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c41
-rw-r--r--gdb/cli/cli-decode.c18
-rw-r--r--gdb/cli/cli-decode.h5
-rw-r--r--gdb/cli/cli-dump.c4
4 files changed, 35 insertions, 33 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 3dfb303..ffb2cd8 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1119,7 +1119,7 @@ when gdb is started.", &cmdlist);
c = add_set_cmd ("verbose", class_support, var_boolean, (char *) &info_verbose,
"Set ",
&setlist),
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_verbose);
set_verbose (NULL, 0, c);
@@ -1130,7 +1130,7 @@ when gdb is started.", &cmdlist);
"Generic command for showing command history parameters.",
&showhistlist, "show history ", 0, &showlist);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("expansion", no_class, var_boolean, (char *) &history_expansion_p,
"Set history expansion on command input.\n\
Without an argument, history expansion is enabled.", &sethistlist),
@@ -1174,9 +1174,10 @@ is used, the same rules apply to its nested commands as to the first ones.");
/* If target is open when baud changes, it doesn't take effect until the
next open (I think, not sure). */
- add_show_from_set (add_set_cmd ("remotebaud", no_class,
- var_zinteger, (char *) &baud_rate,
- "Set baud rate for remote serial I/O.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotebaud", no_class,
+ var_zinteger, (char *) &baud_rate,
+ "Set baud rate for remote serial I/O.\n\
This value is used to set the speed of the serial port when debugging\n\
using remote targets.", &setlist),
&showlist);
@@ -1187,21 +1188,23 @@ using remote targets.", &setlist),
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");
+ deprecate_cmd (deprecated_add_show_from_set (c, &showlist),
+ "show debug remote");
- add_show_from_set (add_set_cmd ("remote", no_class, var_zinteger,
- (char *) &remote_debug,
- "Set debugging of remote protocol.\n\
+ deprecated_add_show_from_set
+ (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.", &setdebuglist),
&showdebuglist);
- add_show_from_set (
- add_set_cmd ("remotetimeout", no_class, var_integer, (char *) &remote_timeout,
- "Set timeout limit to wait for target to respond.\n\
+ deprecated_add_show_from_set
+ (add_set_cmd ("remotetimeout", no_class, var_integer, (char *) &remote_timeout,
+ "Set timeout limit to wait for target to respond.\n\
This value is used to set the time limit for gdb to wait for a response\n\
from the target.", &setlist),
- &showlist);
+ &showlist);
add_prefix_cmd ("debug", no_class, set_debug,
"Generic command for setting gdb debugging flags",
@@ -1279,10 +1282,10 @@ Argument is the name of the user defined command.\n\
With no argument, show definitions of all user defined commands.", &showlist);
add_com ("apropos", class_support, apropos_command, "Search for commands matching a REGEXP");
- add_show_from_set (
- add_set_cmd ("max-user-call-depth", no_class, var_integer,
- (char *) &max_user_call_depth,
- "Set the max call depth for user-defined commands.\n",
- &setlist),
- &showlist);
+ deprecated_add_show_from_set
+ (add_set_cmd ("max-user-call-depth", no_class, var_integer,
+ (char *) &max_user_call_depth,
+ "Set the max call depth for user-defined commands.\n",
+ &setlist),
+ &showlist);
}
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 2b5d68b..fb755a6 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -495,16 +495,16 @@ add_setshow_zinteger_cmd (char *name,
/* Where SETCMD has already been added, add the corresponding show
command to LIST and return a pointer to the added command (not
necessarily the head of LIST). */
-/* NOTE: cagney/2002-03-17: The original version of add_show_from_set
- used memcpy() to clone `set' into `show'. This meant that in
- addition to all the needed fields (var, name, et.al.) some
- unnecessary fields were copied (namely the callback function). The
- function explictly copies relevant fields. For a `set' and `show'
- command to share the same callback, the caller must set both
- explicitly. */
+/* NOTE: cagney/2002-03-17: The original version of
+ deprecated_add_show_from_set used memcpy() to clone `set' into
+ `show'. This meant that in addition to all the needed fields (var,
+ name, et.al.) some unnecessary fields were copied (namely the
+ callback function). The function explictly copies relevant fields.
+ For a `set' and `show' command to share the same callback, the
+ caller must set both explicitly. */
struct cmd_list_element *
-add_show_from_set (struct cmd_list_element *setcmd,
- struct cmd_list_element **list)
+deprecated_add_show_from_set (struct cmd_list_element *setcmd,
+ struct cmd_list_element **list)
{
char *doc;
const static char setstring[] = "Set ";
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index d8ab67d..97e7106 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -295,9 +295,8 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
- struct cmd_list_element
- **);
+extern struct cmd_list_element *deprecated_add_show_from_set (struct cmd_list_element *,
+ struct cmd_list_element **);
/* Functions that implement commands about CLI commands. */
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index ac54aa6..84b4a6d 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -427,8 +427,8 @@ add_dump_command (char *name, void (*func) (char *args, char *mode),
set_cmd_context (c, d);
c->func = call_dump_func;
- /* Replace "Dump " at start of docstring with "Append "
- (borrowed from add_show_from_set). */
+ /* Replace "Dump " at start of docstring with "Append " (borrowed
+ from deprecated_add_show_from_set). */
if ( c->doc[0] == 'W'
&& c->doc[1] == 'r'
&& c->doc[2] == 'i'