Add "make pdf" and "make install-pdf", from Brooks Moses
[deliverable/binutils-gdb.git] / gdb / ocd.c
index 9370a8ccf84db9842436275a162632c67cf71d59..f52990088aac75d21c319941edc04b6f7ac05ff7 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -1,7 +1,7 @@
 /* Target communications support for Macraigor Systems' On-Chip Debugging
 
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free
-   Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2007
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,8 +17,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.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -223,7 +223,7 @@ ocd_start_remote (void *dummy)
    doesn't happen here (in fact, it may not be possible to get the monitor to
    send the appropriate packet).  */
 
-  flush_cached_frames ();
+  reinit_frame_cache ();
   registers_changed ();
   stop_pc = read_pc ();
   print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
@@ -1011,8 +1011,7 @@ ocd_mourn (void)
   generic_mourn_inferior ();
 }
 
-/* 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.  */
 
 void
 ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty)
@@ -1021,7 +1020,7 @@ ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty)
     error (_("Args are not supported by BDM."));
 
   clear_proceed_status ();
-  proceed (bfd_get_start_address (exec_bfd), TARGET_SIGNAL_0, 0);
+  write_pc (bfd_get_start_address (exec_bfd));
 }
 
 void
@@ -1049,28 +1048,27 @@ ocd_load (char *args, int from_tty)
 /* BDM (at least on CPU32) uses a different breakpoint */
 
 int
-ocd_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
+ocd_insert_breakpoint (struct bp_target_info *bp_tgt)
 {
   static char break_insn[] = BDM_BREAKPOINT;
   int val;
 
-  val = target_read_memory (addr, contents_cache, sizeof (break_insn));
+  bp_tgt->placed_size = bp_tgt->shadow_len = sizeof (break_insn);
+  val = target_read_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
+                           bp_tgt->placed_size);
 
   if (val == 0)
-    val = target_write_memory (addr, break_insn, sizeof (break_insn));
+    val = target_write_memory (bp_tgt->placed_address, break_insn,
+                              bp_tgt->placed_size);
 
   return val;
 }
 
 int
-ocd_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
+ocd_remove_breakpoint (struct bp_target_info *bp_tgt)
 {
-  static char break_insn[] = BDM_BREAKPOINT;
-  int val;
-
-  val = target_write_memory (addr, contents_cache, sizeof (break_insn));
-
-  return val;
+  return target_write_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
+                             bp_tgt->placed_size);
 }
 
 static void
@@ -1156,14 +1154,16 @@ _initialize_remote_ocd (void)
   extern struct cmd_list_element *cmdlist;
   static struct cmd_list_element *ocd_cmd_list = NULL;
 
-  deprecated_add_show_from_set
-    (add_set_cmd ("remotetimeout", no_class,
-                 var_integer, (char *) &remote_timeout,
-                 "Set timeout value for remote read.\n", &setlist),
-     &showlist);
+  add_setshow_integer_cmd ("remotetimeout", no_class, &remote_timeout, _("\
+Set timeout value for remote read."), _("\
+Show timeout value for remote read."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
 
-  add_prefix_cmd ("ocd", class_obscure, bdm_command, "", &ocd_cmd_list, "ocd ",
-                 0, &cmdlist);
+  /* FIXME: i18n: What documentation?  */
+  add_prefix_cmd ("ocd", class_obscure, bdm_command, (""), &ocd_cmd_list,
+                 "ocd ", 0, &cmdlist);
 
   /* FIXME: i18n: what documentation? */
   add_cmd ("reset", class_obscure, bdm_reset_command, (""), &ocd_cmd_list);
This page took 0.026642 seconds and 4 git commands to generate.