2003-05-15 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / monitor.c
index 559c0a2f372b4423f7e39e644043326b7e42914e..eabbbd938cc23258a4dfe3910fe083b207ad8107 100644 (file)
@@ -569,12 +569,14 @@ monitor_expect (char *string, char *buf, int buflen)
                return 0;
            }
        }
-      else if ((c == '\021' || c == '\023') &&
-              (STREQ (targ_ops->to_shortname, "m32r")
-               || STREQ (targ_ops->to_shortname, "mon2000")))
-       {                       /* m32r monitor emits random DC1/DC3 chars */
-         continue;
-       }
+#if 0
+      // OBSOLETE       else if ((c == '\021' || c == '\023') &&
+      // OBSOLETE             (STREQ (targ_ops->to_shortname, "m32r")
+      // OBSOLETE              || STREQ (targ_ops->to_shortname, "mon2000")))
+      // OBSOLETE      {                       /* m32r monitor emits random DC1/DC3 chars */
+      // OBSOLETE        continue;
+      // OBSOLETE      }
+#endif
       else
        {
          /* We got a character that doesn't match the string.  We need to
@@ -894,7 +896,7 @@ char *
 monitor_supply_register (int regno, char *valstr)
 {
   ULONGEST val;
-  unsigned char regbuf[MAX_REGISTER_RAW_SIZE];
+  unsigned char regbuf[MAX_REGISTER_SIZE];
   char *p;
 
   val = 0;
@@ -1179,9 +1181,9 @@ monitor_fetch_register (int regno)
   char *regbuf;
   int i;
 
-  regbuf  = alloca (MAX_REGISTER_RAW_SIZE * 2 + 1);
-  zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
-  memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
+  regbuf  = alloca (MAX_REGISTER_SIZE * 2 + 1);
+  zerobuf = alloca (MAX_REGISTER_SIZE);
+  memset (zerobuf, 0, MAX_REGISTER_SIZE);
 
   if (current_monitor->regname != NULL)
     name = current_monitor->regname (regno);
@@ -2096,7 +2098,7 @@ monitor_insert_breakpoint (CORE_ADDR addr, char *shadow)
     addr = ADDR_BITS_REMOVE (addr);
 
   /* Determine appropriate breakpoint size for this address.  */
-  bp = memory_breakpoint_from_pc (&addr, &bplen);
+  bp = gdbarch_breakpoint_from_pc (current_gdbarch, &addr, &bplen);
 
   for (i = 0; i < current_monitor->num_breakpoints; i++)
     {
@@ -2294,19 +2296,10 @@ static struct target_ops monitor_ops;
 static void
 init_base_monitor_ops (void)
 {
-  monitor_ops.to_shortname = NULL;
-  monitor_ops.to_longname = NULL;
-  monitor_ops.to_doc = NULL;
-  monitor_ops.to_open = NULL;
   monitor_ops.to_close = monitor_close;
-  monitor_ops.to_attach = NULL;
-  monitor_ops.to_post_attach = NULL;
-  monitor_ops.to_require_attach = NULL;
   monitor_ops.to_detach = monitor_detach;
-  monitor_ops.to_require_detach = NULL;
   monitor_ops.to_resume = monitor_resume;
   monitor_ops.to_wait = monitor_wait;
-  monitor_ops.to_post_wait = NULL;
   monitor_ops.to_fetch_registers = monitor_fetch_registers;
   monitor_ops.to_store_registers = monitor_store_registers;
   monitor_ops.to_prepare_to_store = monitor_prepare_to_store;
@@ -2314,48 +2307,18 @@ init_base_monitor_ops (void)
   monitor_ops.to_files_info = monitor_files_info;
   monitor_ops.to_insert_breakpoint = monitor_insert_breakpoint;
   monitor_ops.to_remove_breakpoint = monitor_remove_breakpoint;
-  monitor_ops.to_terminal_init = 0;
-  monitor_ops.to_terminal_inferior = 0;
-  monitor_ops.to_terminal_ours_for_output = 0;
-  monitor_ops.to_terminal_ours = 0;
-  monitor_ops.to_terminal_info = 0;
   monitor_ops.to_kill = monitor_kill;
   monitor_ops.to_load = monitor_load;
-  monitor_ops.to_lookup_symbol = 0;
   monitor_ops.to_create_inferior = monitor_create_inferior;
-  monitor_ops.to_post_startup_inferior = NULL;
-  monitor_ops.to_acknowledge_created_inferior = NULL;
-  monitor_ops.to_clone_and_follow_inferior = NULL;
-  monitor_ops.to_post_follow_inferior_by_clone = NULL;
-  monitor_ops.to_insert_fork_catchpoint = NULL;
-  monitor_ops.to_remove_fork_catchpoint = NULL;
-  monitor_ops.to_insert_vfork_catchpoint = NULL;
-  monitor_ops.to_remove_vfork_catchpoint = NULL;
-  monitor_ops.to_has_forked = NULL;
-  monitor_ops.to_has_vforked = NULL;
-  monitor_ops.to_can_follow_vfork_prior_to_exec = NULL;
-  monitor_ops.to_post_follow_vfork = NULL;
-  monitor_ops.to_insert_exec_catchpoint = NULL;
-  monitor_ops.to_remove_exec_catchpoint = NULL;
-  monitor_ops.to_has_execd = NULL;
-  monitor_ops.to_reported_exec_events_per_exec_call = NULL;
-  monitor_ops.to_has_exited = NULL;
   monitor_ops.to_mourn_inferior = monitor_mourn_inferior;
-  monitor_ops.to_can_run = 0;
-  monitor_ops.to_notice_signals = 0;
-  monitor_ops.to_thread_alive = 0;
   monitor_ops.to_stop = monitor_stop;
   monitor_ops.to_rcmd = monitor_rcmd;
-  monitor_ops.to_pid_to_exec_file = NULL;
   monitor_ops.to_stratum = process_stratum;
-  monitor_ops.DONT_USE = 0;
   monitor_ops.to_has_all_memory = 1;
   monitor_ops.to_has_memory = 1;
   monitor_ops.to_has_stack = 1;
   monitor_ops.to_has_registers = 1;
   monitor_ops.to_has_execution = 1;
-  monitor_ops.to_sections = 0;
-  monitor_ops.to_sections_end = 0;
   monitor_ops.to_magic = OPS_MAGIC;
 }                              /* init_base_monitor_ops */
 
This page took 0.027946 seconds and 4 git commands to generate.