2005-02-21 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / remote.c
index 26921a4f9913ecf210c14b12fa8ca80a604b2733..444e6e8cfd4ae108bdf10b1e96661b6c899310ec 100644 (file)
@@ -634,7 +634,7 @@ add_packet_config_cmd (struct packet_config *config,
                       char *name,
                       char *title,
                       cmd_sfunc_ftype *set_func,
-                      cmd_sfunc_ftype *show_func,
+                      show_value_ftype *show_func,
                       struct cmd_list_element **set_remote_list,
                       struct cmd_list_element **show_remote_list,
                       int legacy)
@@ -659,8 +659,7 @@ add_packet_config_cmd (struct packet_config *config,
   /* set/show TITLE-packet {auto,on,off} */
   cmd_name = xstrprintf ("%s-packet", title);
   add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
-                               &config->detect, set_doc, show_doc,
-                               "", NULL /* FIXME: i18n: Print message is? */,
+                               &config->detect, set_doc, show_doc, NULL, /* help_doc */
                                set_func, show_func,
                                set_remote_list, show_remote_list);
   /* set/show remote NAME-packet {auto,on,off} -- legacy.  */
@@ -750,9 +749,11 @@ set_remote_protocol_vcont_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_vcont_packet_cmd (char *args, int from_tty,
-                                      struct cmd_list_element *c)
+show_remote_protocol_vcont_packet_cmd (struct ui_file *file, int from_tty,
+                                      struct cmd_list_element *c,
+                                      const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_vcont);
 }
 
@@ -767,9 +768,11 @@ set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
-                                        struct cmd_list_element *c)
+show_remote_protocol_qSymbol_packet_cmd (struct ui_file *file, int from_tty,
+                                        struct cmd_list_element *c,
+                                        const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_qSymbol);
 }
 
@@ -785,9 +788,11 @@ set_remote_protocol_P_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_P_packet_cmd (char *args, int from_tty,
-                                  struct cmd_list_element *c)
+show_remote_protocol_P_packet_cmd (struct ui_file *file, int from_tty,
+                                  struct cmd_list_element *c,
+                                  const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_P);
 }
 
@@ -816,9 +821,11 @@ set_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
-                                              struct cmd_list_element *c)
+show_remote_protocol_Z_software_bp_packet_cmd (struct ui_file *file, int from_tty,
+                                              struct cmd_list_element *c,
+                                              const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
 }
 
@@ -830,9 +837,11 @@ set_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
-                                              struct cmd_list_element *c)
+show_remote_protocol_Z_hardware_bp_packet_cmd (struct ui_file *file, int from_tty,
+                                              struct cmd_list_element *c,
+                                              const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
 }
 
@@ -844,9 +853,11 @@ set_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
-                                           struct cmd_list_element *c)
+show_remote_protocol_Z_write_wp_packet_cmd (struct ui_file *file, int from_tty,
+                                           struct cmd_list_element *c,
+                                           const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
 }
 
@@ -858,9 +869,11 @@ set_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
-                                          struct cmd_list_element *c)
+show_remote_protocol_Z_read_wp_packet_cmd (struct ui_file *file, int from_tty,
+                                          struct cmd_list_element *c,
+                                          const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
 }
 
@@ -872,9 +885,11 @@ set_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
-                                            struct cmd_list_element *c)
+show_remote_protocol_Z_access_wp_packet_cmd (struct ui_file *file, int from_tty,
+                                            struct cmd_list_element *c,
+                                            const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
 }
 
@@ -896,8 +911,9 @@ set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_Z_packet_cmd (char *args, int from_tty,
-                                  struct cmd_list_element *c)
+show_remote_protocol_Z_packet_cmd (struct ui_file *file, int from_tty,
+                                  struct cmd_list_element *c,
+                                  const char *value)
 {
   int i;
   for (i = 0; i < NR_Z_PACKET_TYPES; i++)
@@ -938,9 +954,11 @@ set_remote_protocol_binary_download_cmd (char *args,
 }
 
 static void
-show_remote_protocol_binary_download_cmd (char *args, int from_tty,
-                                         struct cmd_list_element *c)
+show_remote_protocol_binary_download_cmd (struct ui_file *file, int from_tty,
+                                         struct cmd_list_element *c,
+                                         const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_binary_download);
 }
 
@@ -955,9 +973,11 @@ set_remote_protocol_qPart_auxv_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_qPart_auxv_packet_cmd (char *args, int from_tty,
-                                           struct cmd_list_element *c)
+show_remote_protocol_qPart_auxv_packet_cmd (struct ui_file *file, int from_tty,
+                                           struct cmd_list_element *c,
+                                           const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_qPart_auxv);
 }
 
@@ -971,9 +991,11 @@ set_remote_protocol_p_packet_cmd (char *args, int from_tty,
 }
 
 static void
-show_remote_protocol_p_packet_cmd (char *args, int from_tty,
-                                  struct cmd_list_element *c)
+show_remote_protocol_p_packet_cmd (struct ui_file *file, int from_tty,
+                                  struct cmd_list_element *c,
+                                  const char *value)
 {
+  deprecated_show_value_hack (file, from_tty, c, value);
   show_packet_config_cmd (&remote_protocol_p);
 }
 
@@ -5267,16 +5289,16 @@ threadlist_update_test_cmd (char *cmd, int tty)
 static void
 init_remote_threadtests (void)
 {
-  add_com ("tlist", class_obscure, threadlist_test_cmd,
-     "Fetch and print the remote list of thread identifiers, one pkt only");
+  add_com ("tlist", class_obscure, threadlist_test_cmd, _("\
+Fetch and print the remote list of thread identifiers, one pkt only"));
   add_com ("tinfo", class_obscure, threadinfo_test_cmd,
-          "Fetch and display info about one thread");
+          _("Fetch and display info about one thread"));
   add_com ("tset", class_obscure, threadset_test_cmd,
-          "Test setting to a different thread");
+          _("Test setting to a different thread"));
   add_com ("tupd", class_obscure, threadlist_update_test_cmd,
-          "Iterate through updating all remote thread info");
+          _("Iterate through updating all remote thread info"));
   add_com ("talive", class_obscure, threadalive_test,
-          " Remote thread alive test ");
+          _(" Remote thread alive test "));
 }
 
 #endif /* 0 */
@@ -5500,13 +5522,13 @@ show_remote_cmd (char *args, int from_tty)
 {
   /* FIXME: cagney/2002-06-15: This function should iterate over
      remote_show_cmdlist for a list of sub commands to show.  */
-  show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
-  show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
-  show_remote_protocol_p_packet_cmd (args, from_tty, NULL);
-  show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
-  show_remote_protocol_vcont_packet_cmd (args, from_tty, NULL);
-  show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
-  show_remote_protocol_qPart_auxv_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_Z_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_P_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_p_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_qSymbol_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_vcont_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_binary_download_cmd (gdb_stdout, from_tty, NULL, NULL);
+  show_remote_protocol_qPart_auxv_packet_cmd (gdb_stdout, from_tty, NULL, NULL);
 }
 
 static void
@@ -5570,72 +5592,71 @@ _initialize_remote (void)
 
   /* set/show remote ...  */
 
-  add_prefix_cmd ("remote", class_maintenance, set_remote_cmd, "\
+  add_prefix_cmd ("remote", class_maintenance, set_remote_cmd, _("\
 Remote protocol specific variables\n\
 Configure various remote-protocol specific variables such as\n\
-the packets being used",
+the packets being used"),
                  &remote_set_cmdlist, "set remote ",
                  0 /* allow-unknown */, &setlist);
-  add_prefix_cmd ("remote", class_maintenance, show_remote_cmd, "\
+  add_prefix_cmd ("remote", class_maintenance, show_remote_cmd, _("\
 Remote protocol specific variables\n\
 Configure various remote-protocol specific variables such as\n\
-the packets being used",
+the packets being used"),
                  &remote_show_cmdlist, "show remote ",
                  0 /* allow-unknown */, &showlist);
 
-  add_cmd ("compare-sections", class_obscure, compare_sections_command,
-          "Compare section data on target to the exec file.\n\
-Argument is a single section name (default: all loaded sections).",
+  add_cmd ("compare-sections", class_obscure, compare_sections_command, _("\
+Compare section data on target to the exec file.\n\
+Argument is a single section name (default: all loaded sections)."),
           &cmdlist);
 
-  add_cmd ("packet", class_maintenance, packet_command,
-          "Send an arbitrary packet to a remote target.\n\
+  add_cmd ("packet", class_maintenance, packet_command, _("\
+Send an arbitrary packet to a remote target.\n\
    maintenance packet TEXT\n\
 If GDB is talking to an inferior via the GDB serial protocol, then\n\
 this command sends the string TEXT to the inferior, and displays the\n\
 response packet.  GDB supplies the initial `$' character, and the\n\
-terminating `#' character and checksum.",
+terminating `#' character and checksum."),
           &maintenancelist);
 
   add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break, _("\
 Set whether to send break if interrupted."), _("\
 Show whether to send break if interrupted."), _("\
 If set, a break, instead of a cntrl-c, is sent to the remote target."),
-                          NULL, /* FIXME: i18n: Whether to send break if interrupted is %s.  */
-                          NULL, NULL,
+                          NULL, NULL, /* FIXME: i18n: Whether to send break if interrupted is %s.  */
                           &setlist, &showlist);
 
   /* Install commands for configuring memory read/write packets.  */
 
-  add_cmd ("remotewritesize", no_class, set_memory_write_packet_size,
-          "Set the maximum number of bytes per memory write packet (deprecated).\n",
+  add_cmd ("remotewritesize", no_class, set_memory_write_packet_size, _("\
+Set the maximum number of bytes per memory write packet (deprecated)."),
           &setlist);
-  add_cmd ("remotewritesize", no_class, show_memory_write_packet_size,
-          "Show the maximum number of bytes per memory write packet (deprecated).\n",
+  add_cmd ("remotewritesize", no_class, show_memory_write_packet_size, _("\
+Show the maximum number of bytes per memory write packet (deprecated)."),
           &showlist);
   add_cmd ("memory-write-packet-size", no_class,
-          set_memory_write_packet_size,
-          "Set the maximum number of bytes per memory-write packet.\n"
-          "Specify the number of bytes in a packet or 0 (zero) for the\n"
-          "default packet size.  The actual limit is further reduced\n"
-          "dependent on the target.  Specify ``fixed'' to disable the\n"
-          "further restriction and ``limit'' to enable that restriction\n",
+          set_memory_write_packet_size, _("\
+Set the maximum number of bytes per memory-write packet.\n\
+Specify the number of bytes in a packet or 0 (zero) for the\n\
+default packet size.  The actual limit is further reduced\n\
+dependent on the target.  Specify ``fixed'' to disable the\n\
+further restriction and ``limit'' to enable that restriction."),
           &remote_set_cmdlist);
   add_cmd ("memory-read-packet-size", no_class,
-          set_memory_read_packet_size,
-          "Set the maximum number of bytes per memory-read packet.\n"
-          "Specify the number of bytes in a packet or 0 (zero) for the\n"
-          "default packet size.  The actual limit is further reduced\n"
-          "dependent on the target.  Specify ``fixed'' to disable the\n"
-          "further restriction and ``limit'' to enable that restriction\n",
+          set_memory_read_packet_size, _("\
+Set the maximum number of bytes per memory-read packet.\n\
+Specify the number of bytes in a packet or 0 (zero) for the\n\
+default packet size.  The actual limit is further reduced\n\
+dependent on the target.  Specify ``fixed'' to disable the\n\
+further restriction and ``limit'' to enable that restriction."),
           &remote_set_cmdlist);
   add_cmd ("memory-write-packet-size", no_class,
           show_memory_write_packet_size,
-          "Show the maximum number of bytes per memory-write packet.\n",
+          _("Show the maximum number of bytes per memory-write packet."),
           &remote_show_cmdlist);
   add_cmd ("memory-read-packet-size", no_class,
           show_memory_read_packet_size,
-          "Show the maximum number of bytes per memory-read packet.\n",
+          _("Show the maximum number of bytes per memory-read packet."),
           &remote_show_cmdlist);
 
   add_setshow_zinteger_cmd ("hardware-watchpoint-limit", no_class,
@@ -5643,25 +5664,23 @@ If set, a break, instead of a cntrl-c, is sent to the remote target."),
 Set the maximum number of target hardware watchpoints."), _("\
 Show the maximum number of target hardware watchpoints."), _("\
 Specify a negative limit for unlimited."),
-                           NULL, /* FIXME: i18n: The maximum number of target hardware watchpoints is %s.  */
-                           NULL, NULL,
+                           NULL, NULL, /* FIXME: i18n: The maximum number of target hardware watchpoints is %s.  */
                            &remote_set_cmdlist, &remote_show_cmdlist);
   add_setshow_zinteger_cmd ("hardware-breakpoint-limit", no_class,
                            &remote_hw_breakpoint_limit, _("\
 Set the maximum number of target hardware breakpoints."), _("\
 Show the maximum number of target hardware breakpoints."), _("\
 Specify a negative limit for unlimited."),
-                           NULL, /* FIXME: i18n: The maximum number of target hardware breakpoints is %s.  */
-                           NULL, NULL,
+                           NULL, NULL, /* FIXME: i18n: The maximum number of target hardware breakpoints is %s.  */
                            &remote_set_cmdlist, &remote_show_cmdlist);
 
-  deprecated_add_show_from_set
-    (add_set_cmd ("remoteaddresssize", class_obscure,
-                 var_integer, (char *) &remote_address_size,
-                 "Set the maximum size of the address (in bits) \
-in a memory packet.\n",
-                 &setlist),
-     &showlist);
+  add_setshow_integer_cmd ("remoteaddresssize", class_obscure,
+                          &remote_address_size, _("\
+Set the maximum size of the address (in bits) in a memory packet."), _("\
+Show the maximum size of the address (in bits) in a memory packet."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
 
   add_packet_config_cmd (&remote_protocol_binary_download,
                         "X", "binary-download",
@@ -5669,15 +5688,6 @@ in a memory packet.\n",
                         show_remote_protocol_binary_download_cmd,
                         &remote_set_cmdlist, &remote_show_cmdlist,
                         1);
-#if 0
-  /* XXXX - should ``set remotebinarydownload'' be retained for
-     compatibility.  */
-  deprecated_add_show_from_set
-    (add_set_cmd ("remotebinarydownload", no_class,
-                 var_boolean, (char *) &remote_binary_download,
-                 "Set binary downloads.\n", &setlist),
-     &showlist);
-#endif
 
   add_packet_config_cmd (&remote_protocol_vcont,
                         "vCont", "verbose-resume",
@@ -5756,9 +5766,8 @@ Set use of remote protocol `Z' packets"), _("\
 Show use of remote protocol `Z' packets "), _("\
 When set, GDB will attempt to use the remote breakpoint and watchpoint\n\
 packets."),
-                               NULL, /* FIXME: i18n: Use of remote protocol `Z' packets is %s.  */
                                set_remote_protocol_Z_packet_cmd,
-                               show_remote_protocol_Z_packet_cmd,
+                               show_remote_protocol_Z_packet_cmd, /* FIXME: i18n: Use of remote protocol `Z' packets is %s.  */
                                &remote_set_cmdlist, &remote_show_cmdlist);
 
   /* Eventually initialize fileio.  See fileio.c */
This page took 0.028863 seconds and 4 git commands to generate.