Allow for the possibility that the local labels won't be in the objdump output.
[deliverable/binutils-gdb.git] / gdb / remote-rdi.c
index 708c45fde96299654be15b5268cbe496602ef854..fbd176fa83eea927a8b2ddb8271a59a071cc0a68 100644 (file)
@@ -1,5 +1,5 @@
 /* GDB interface to ARM RDI library.
-   Copyright 1997, 1998 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
 #include "gdbthread.h"
 #include "gdbcore.h"
 #include "breakpoint.h"
+#include "completer.h"
+#include "regcache.h"
 
 #ifdef USG
 #include <sys/types.h>
@@ -52,6 +53,7 @@ static void arm_rdi_files_info (struct target_ops *ignore);
 
 static int arm_rdi_xfer_memory (CORE_ADDR memaddr, char *myaddr,
                                int len, int should_write,
+                               struct mem_attrib *attrib,
                                struct target_ops *target);
 
 static void arm_rdi_prepare_to_store (void);
@@ -331,7 +333,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
     for (entry = local_bp_list; entry != NULL; entry = entry->next)
       {
        if (preventry)
-         free (preventry);
+         xfree (preventry);
       }
   }
 
@@ -626,8 +628,9 @@ arm_rdi_store_registers (int regno)
 
 /* ARGSUSED */
 static int
-arm_rdi_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
-                    int should_write, struct target_ops *target)
+arm_rdi_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
+                    struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+                    struct target_ops *target ATTRIBUTE_UNUSED)
 {
   int rslt, i;
 
@@ -773,7 +776,7 @@ arm_rdi_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
        {
          preventry->next = entry->next;
        }
-      free (entry);
+      xfree (entry);
     }
   return 0;
 }
@@ -929,6 +932,13 @@ rdi_error_signal (int err)
       return TARGET_SIGNAL_UNKNOWN;
     }
 }
+
+static void
+arm_rdi_stop(void)
+{
+  angel_RDI_stop_request();
+}
+
 \f
 /* Define the target operations structure.  */
 
@@ -944,6 +954,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   arm_rdi_ops.to_detach = arm_rdi_detach;
   arm_rdi_ops.to_resume = arm_rdi_resume;
   arm_rdi_ops.to_wait = arm_rdi_wait;
+  arm_rdi_ops.to_stop = arm_rdi_stop;
   arm_rdi_ops.to_fetch_registers = arm_rdi_fetch_registers;
   arm_rdi_ops.to_store_registers = arm_rdi_store_registers;
   arm_rdi_ops.to_prepare_to_store = arm_rdi_prepare_to_store;
@@ -974,7 +985,7 @@ rdilogfile_command (char *arg, int from_tty)
     }
 
   if (log_filename)
-    free (log_filename);
+    xfree (log_filename);
 
   log_filename = xstrdup (arg);
 
@@ -1012,6 +1023,8 @@ rdilogenable_command (char *args, int from_tty)
 void
 _initialize_remote_rdi (void)
 {
+  struct cmd_list_element *c;
+
   init_rdi_ops ();
   add_target (&arm_rdi_ops);
 
@@ -1019,14 +1032,15 @@ _initialize_remote_rdi (void)
   Adp_SetLogfile (log_filename);
   Adp_SetLogEnable (log_enable);
 
-  add_cmd ("rdilogfile", class_maintenance,
-          rdilogfile_command,
-          "Set filename for ADP packet log.\n\
+  c = add_cmd ("rdilogfile", class_maintenance,
+              rdilogfile_command,
+              "Set filename for ADP packet log.\n\
 This file is used to log Angel Debugger Protocol packets.\n\
 With a single argument, sets the logfile name to that value.\n\
 Without an argument, shows the current logfile name.\n\
 See also: rdilogenable\n",
           &maintenancelist);
+  c->completer = filename_completer;
 
   add_cmd ("rdilogenable", class_maintenance,
           rdilogenable_command,
This page took 0.02512 seconds and 4 git commands to generate.