* configure.ac: Use AC_CHECK_DECLS instead of gcc_AC_CHECK_DECLS
[deliverable/binutils-gdb.git] / gdb / m32r-rom.c
index 444a6cd09fdd738344eb60cbfb0b8f8c118bcafc..3361c3c51a483052abb2e99031334a5a2587e9dc 100644 (file)
@@ -1,7 +1,8 @@
 /* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, 
    the GNU debugger.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2004 Free Software
+   Foundation, Inc.
 
    Adapted by Michael Snyder of Cygnus Support.
 
@@ -27,6 +28,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
+#include "exceptions.h"
 #include "monitor.h"
 #include "serial.h"
 #include "symtab.h"
@@ -319,7 +321,7 @@ init_m32r_cmds (void)
   m32r_cmds.getreg.term_cmd = NULL;    /* getreg.term_cmd */
   m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
   m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";  /* register_pattern */
-  m32r_cmds.supply_register = m32r_supply_register;    /* supply_register */
+  m32r_cmds.supply_register = m32r_supply_register;
   m32r_cmds.load_routine = NULL;       /* load_routine (defaults to SRECs) */
   m32r_cmds.load = NULL;       /* download command */
   m32r_cmds.loadresp = NULL;   /* load response */
@@ -379,7 +381,7 @@ init_mon2000_cmds (void)
   mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
   mon2000_cmds.dump_registers = ".reg\r";      /* dump_registers */
   mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";       /* register_pattern */
-  mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
+  mon2000_cmds.supply_register = m32r_supply_register;
   mon2000_cmds.load_routine = NULL;    /* load_routine (defaults to SRECs) */
   mon2000_cmds.load = NULL;    /* download command */
   mon2000_cmds.loadresp = NULL;        /* load response */
@@ -398,63 +400,6 @@ mon2000_open (char *args, int from_tty)
   monitor_open (args, &mon2000_cmds, from_tty);
 }
 
-/* Function: set_board_address
-   Tell the BootOne monitor what it's ethernet IP address is. */
-
-static void
-m32r_set_board_address (char *args, int from_tty)
-{
-  int resp_len;
-  char buf[1024];
-
-  if (args && *args)
-    {
-      monitor_printf ("ulip %s\n", args);
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-      /* now parse the result for success */
-    }
-  else
-    error ("Requires argument (IP address for M32R-EVA board)");
-}
-
-/* Function: set_server_address
-   Tell the BootOne monitor what gdb's ethernet IP address is. */
-
-static void
-m32r_set_server_address (char *args, int from_tty)
-{
-  int resp_len;
-  char buf[1024];
-
-  if (args && *args)
-    {
-      monitor_printf ("uhip %s\n", args);
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-      /* now parse the result for success */
-    }
-  else
-    error ("Requires argument (IP address of GDB's host computer)");
-}
-
-/* Function: set_download_path
-   Tell the BootOne monitor the default path for downloadable SREC files. */
-
-static void
-m32r_set_download_path (char *args, int from_tty)
-{
-  int resp_len;
-  char buf[1024];
-
-  if (args && *args)
-    {
-      monitor_printf ("up %s\n", args);
-      resp_len = monitor_expect_prompt (buf, sizeof (buf));
-      /* now parse the result for success */
-    }
-  else
-    error ("Requires argument (default path for downloadable SREC files)");
-}
-
 static void
 m32r_upload_command (char *args, int from_tty)
 {
@@ -492,16 +437,18 @@ m32r_upload_command (char *args, int from_tty)
       buf[0] = 0;
       gethostname (buf, sizeof (buf));
       if (buf[0] != 0)
-       hostent = gethostbyname (buf);
-      if (hostent != 0)
        {
+         hostent = gethostbyname (buf);
+         if (hostent != 0)
+           {
 #if 1
-         memcpy (&inet_addr.s_addr, hostent->h_addr,
-                 sizeof (inet_addr.s_addr));
-         server_addr = (char *) inet_ntoa (inet_addr);
+             memcpy (&inet_addr.s_addr, hostent->h_addr,
+                     sizeof (inet_addr.s_addr));
+             server_addr = (char *) inet_ntoa (inet_addr);
 #else
-         server_addr = (char *) inet_ntoa (hostent->h_addr);
+             server_addr = (char *) inet_ntoa (hostent->h_addr);
 #endif
+           }
        }
       if (server_addr == 0)    /* failed? */
        error
@@ -612,22 +559,25 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   mon2000_ops.to_open = mon2000_open;
   add_target (&mon2000_ops);
 
-  add_setshow_cmd ("download-path", class_obscure,
-                  var_string, &download_path,
-                  "Set the default path for downloadable SREC files.",
-                  "Show the default path for downloadable SREC files.",
+  add_setshow_string_cmd ("download-path", class_obscure, &download_path, "\
+Set the default path for downloadable SREC files.", "\
+Show the default path for downloadable SREC files.", "\
+Determines the default path for downloadable SREC files.", "\
+The default path for downloadable SREC files is %s.",
                   NULL, NULL, &setlist, &showlist);
 
-  add_setshow_cmd ("board-address", class_obscure,
-                  var_string, &board_addr,
-                  "Set IP address for M32R-EVA target board.",
-                  "Show IP address for M32R-EVA target board.",
+  add_setshow_string_cmd ("board-address", class_obscure, &board_addr, "\
+Set IP address for M32R-EVA target board.", "\
+Show IP address for M32R-EVA target board.", "\
+Determine the IP address for M32R-EVA target board.", "\
+IP address for M32R-EVA target board is %s",
                   NULL, NULL, &setlist, &showlist);
 
-  add_setshow_cmd ("server-address", class_obscure,
-                  var_string, &server_addr,
-                  "Set IP address for download server (GDB's host computer).",
-                  "Show IP address for download server (GDB's host computer).",
+  add_setshow_string_cmd ("server-address", class_obscure, &server_addr, "\
+Set IP address for download server (GDB's host computer).", "\
+Show IP address for download server (GDB's host computer).", "\
+Determine the IP address for download server (GDB's host computer).", "\
+IP address for download server (GDB's host computer) is %s.",
                   NULL, NULL, &setlist, &showlist);
 
   add_com ("upload", class_obscure, m32r_upload_command,
This page took 0.025958 seconds and 4 git commands to generate.