*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / monitor.c
index 81c4876cd302fbe642c954d791eef62ee8ae9b54..3b7619e67a7fa87991c5d7503b20ce22a79a505f 100644 (file)
@@ -1,7 +1,7 @@
 /* Remote debugging interface for boot monitors, for GDB.
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by Rob Savoye for Cygnus.
    Resurrected from the ashes by Stu Grossman.
@@ -20,8 +20,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* This file was derived from various remote-* modules. It is a collection
    of generic support functions so GDB can talk directly to a ROM based
@@ -80,13 +80,13 @@ static ptid_t monitor_wait (ptid_t ptid, struct target_waitstatus *status);
 static void monitor_fetch_registers (int regno);
 static void monitor_store_registers (int regno);
 static void monitor_prepare_to_store (void);
-static int monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+static int monitor_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
                                int write, 
                                struct mem_attrib *attrib,
                                struct target_ops *target);
 static void monitor_files_info (struct target_ops *ops);
-static int monitor_insert_breakpoint (CORE_ADDR addr, char *shadow);
-static int monitor_remove_breakpoint (CORE_ADDR addr, char *shadow);
+static int monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow);
+static int monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow);
 static void monitor_kill (void);
 static void monitor_load (char *file, int from_tty);
 static void monitor_mourn_inferior (void);
@@ -839,7 +839,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
     }
 
   if (from_tty)
-    printf_unfiltered ("Remote target %s connected to %s\n", name, dev_name);
+    printf_unfiltered (_("Remote target %s connected to %s\n"), name, dev_name);
 
   push_target (targ_ops);
 
@@ -879,7 +879,7 @@ monitor_detach (char *args, int from_tty)
 {
   pop_target ();               /* calls monitor_close to do the real work */
   if (from_tty)
-    printf_unfiltered ("Ending remote %s debugging\n", target_shortname);
+    printf_unfiltered (_("Ending remote %s debugging\n"), target_shortname);
 }
 
 /* Convert VALSTR into the target byte-ordered value of REGNO and store it.  */
@@ -1411,7 +1411,7 @@ monitor_prepare_to_store (void)
 static void
 monitor_files_info (struct target_ops *ops)
 {
-  printf_unfiltered ("\tAttached to %s at %d baud.\n", dev_name, baud_rate);
+  printf_unfiltered (_("\tAttached to %s at %d baud.\n"), dev_name, baud_rate);
 }
 
 static int
@@ -1982,7 +1982,7 @@ monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
    unused. */
 
 static int
-monitor_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+monitor_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
                     struct mem_attrib *attrib, struct target_ops *target)
 {
   int res;
@@ -2008,8 +2008,7 @@ monitor_kill (void)
   return;                      /* ignore attempts to kill target system */
 }
 
-/* All we actually do is set the PC to the start address of exec_bfd, and start
-   the program at that point.  */
+/* All we actually do is set the PC to the start address of exec_bfd.  */
 
 static void
 monitor_create_inferior (char *exec_file, char *args, char **env,
@@ -2020,7 +2019,7 @@ monitor_create_inferior (char *exec_file, char *args, char **env,
 
   first_time = 1;
   clear_proceed_status ();
-  proceed (bfd_get_start_address (exec_bfd), TARGET_SIGNAL_0, 0);
+  write_pc (bfd_get_start_address (exec_bfd));
 }
 
 /* Clean up when a program exits.
@@ -2038,7 +2037,7 @@ monitor_mourn_inferior (void)
 /* Tell the monitor to add a breakpoint.  */
 
 static int
-monitor_insert_breakpoint (CORE_ADDR addr, char *shadow)
+monitor_insert_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
 {
   int i;
   const unsigned char *bp;
@@ -2072,7 +2071,7 @@ monitor_insert_breakpoint (CORE_ADDR addr, char *shadow)
 /* Tell the monitor to remove a breakpoint.  */
 
 static int
-monitor_remove_breakpoint (CORE_ADDR addr, char *shadow)
+monitor_remove_breakpoint (CORE_ADDR addr, gdb_byte *shadow)
 {
   int i;
 
@@ -2295,19 +2294,20 @@ void
 _initialize_remote_monitors (void)
 {
   init_base_monitor_ops ();
-  deprecated_add_show_from_set
-    (add_set_cmd ("hash", no_class, var_boolean,
-                 (char *) &hashmark,
-                 "Set display of activity while downloading a file.\n\
-When enabled, a hashmark \'#\' is displayed.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("monitor", no_class, var_zinteger,
-                 (char *) &monitor_debug_p,
-                 "Set debugging of remote monitor communication.\n\
+  add_setshow_boolean_cmd ("hash", no_class, &hashmark, _("\
+Set display of activity while downloading a file."), _("\
+Show display of activity while downloading a file."), _("\
+When enabled, a hashmark \'#\' is displayed."),
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_zinteger_cmd ("monitor", no_class, &monitor_debug_p, _("\
+Set debugging of remote monitor communication."), _("\
+Show debugging of remote monitor communication."), _("\
 When enabled, communication between GDB and the remote monitor\n\
-is displayed.", &setdebuglist),
-     &showdebuglist);
+is displayed."),
+                           NULL,
+                           NULL, /* FIXME: i18n: */
+                           &setdebuglist, &showdebuglist);
 }
This page took 0.027962 seconds and 4 git commands to generate.