Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / remote-adapt.c
index 7900d4685d99f9252de66e8a9c9dc1bbf6d9dac3..f66b6bd0e1ac5df4727fbdfec3da21e90b2b6ee2 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote debugging interface for AMD 290*0 Adapt Monitor Version 2.1d18. 
-   Copyright 1990, 1991 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
    Contributed by David Wood at New York University (wood@lab.ultra.nyu.edu).
    Adapted from work done at Cygnus Support in remote-eb.c.
 
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 
 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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* This is like remote.c but is for an esoteric situation--
    having a 29k board attached to an Adapt inline monitor. 
@@ -29,11 +29,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
        o - I can't get 19200 baud rate to work. 
    7/91 o - Freeze mode tracing can be done on a 29050.  */
 
-#include <stdio.h>
-#include <string.h>
+
+
 #include "defs.h"
-#include "tm.h"
-#include "param-no-tm.h"
+#include "gdb_string.h"
 #include "inferior.h"
 #include "wait.h"
 #include "value.h"
@@ -45,47 +44,59 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "target.h"
 #include "gdbcore.h"
 
+/* This processor is getting rusty but I am trying to keep it
+   up to date at least with data structure changes.
+   Activate this block to compile just this file.
+   */
+#define COMPILE_CHECK 0
+#if COMPILE_CHECK
+#define Q_REGNUM 0
+#define VAB_REGNUM 0
+#define CPS_REGNUM 0
+#define IPA_REGNUM 0
+#define IPB_REGNUM 0
+#define GR1_REGNUM 0
+#define LR0_REGNUM 0
+#define IPC_REGNUM 0
+#define CR_REGNUM 0
+#define BP_REGNUM 0
+#define FC_REGNUM 0
+#define INTE_REGNUM 0
+#define EXO_REGNUM 0
+#define GR96_REGNUM 0
+#define NPC_REGNUM
+#define FPE_REGNUM 0
+#define PC2_REGNUM 0
+#define FPS_REGNUM 0
+#define ALU_REGNUM 0
+#define LRU_REGNUM 0
+#define TERMINAL int
+#define RAW 1
+#define ANYP 1
+extern int a29k_freeze_mode ;
+extern int processor_type ;
+extern char * processor_name ;
+#endif
+
 /* External data declarations */
 extern int stop_soon_quietly;           /* for wait_for_inferior */
 
-/* External function declarations */
-extern struct value *call_function_by_hand();
-
 /* Forward data declarations */
 extern struct target_ops adapt_ops;            /* Forward declaration */
 
 /* Forward function declarations */
 static void adapt_fetch_registers ();
-static int  adapt_store_registers ();
-static void   adapt_close ();
-
-/* 
- * Processor types. It is assumed that the adapt has the correct 
- * ROM for the given processor. 
- */
-#define TYPE_UNKNOWN   0
-#define TYPE_A29000    1
-#define TYPE_A29030    2
-#define TYPE_A29050    3
-static char *processor_name[] = { "Unknown", "A29000", "A29030", "A29050" };
-static int processor_type=TYPE_UNKNOWN;
+static void adapt_store_registers ();
+static void adapt_close ();
+static int  adapt_clear_breakpoints();
 
 #define FREEZE_MODE    (read_register(CPS_REGNUM) && 0x400) 
-#define USE_SHADOW_PC   ((processor_type == TYPE_A29050) && FREEZE_MODE)
-
-
-/* #define DEBUG       /* */
-#ifdef DEBUG
-# define DENTER(NAME)   (printf_filtered("Entering %s\n",NAME), fflush(stdout))
-# define DEXIT(NAME)    (printf_filtered("Exiting  %s\n",NAME), fflush(stdout))
-#else
-# define DENTER(NAME)
-# define DEXIT(NAME)
-#endif
+#define USE_SHADOW_PC  ((processor_type == a29k_freeze_mode) && FREEZE_MODE)
 
 /* Can't seem to get binary coff working */
 #define ASCII_COFF             /* Adapt will be downloaded with ascii coff */
 
+/* FIXME: Replace with `set remotedebug'.  */
 #define LOG_FILE "adapt.log"
 #if defined (LOG_FILE)
 FILE *log_file=NULL;
@@ -110,6 +121,7 @@ rawmode(desc, turnon)
 int    desc;
 int    turnon;
 {
+  
   TERMINAL sg;
 
   if (desc < 0)
@@ -292,7 +304,7 @@ get_hex_regs (n, regno)
        long val;
        while (n--) {
                val = get_hex_word();
-               supply_register(regno++,&val);
+               supply_register(regno++,(char *) &val);
        }
 }
 /* Called when SIGALRM signal sent due to alarm() timeout.  */
@@ -330,11 +342,9 @@ adapt_kill(arg,from_tty)
 char   *arg;
 int    from_tty;
 {
-       DENTER("adapt_kill()");
        fprintf (adapt_stream, "K");
        fprintf (adapt_stream, "\r");
        expect_prompt ();
-       DEXIT("adapt_kill()");
 }
 /*
  * Download a file specified in 'args', to the adapt. 
@@ -349,7 +359,6 @@ int fromtty;
        int     n;
        char    buffer[1024];
        
-       DENTER("adapt_load()");
        if (!adapt_stream) {
                printf_filtered("Adapt not open. Use 'target' command to open adapt\n");
                return;
@@ -389,7 +398,6 @@ int fromtty;
        expect_prompt ();       /* Skip garbage that comes out */
        fprintf (adapt_stream, "\r");
        expect_prompt ();
-       DEXIT("adapt_load()");
 }
 
 /* This is called not only when we first attach, but also when the
@@ -402,8 +410,6 @@ adapt_create_inferior (execfile, args, env)
 {
   int entry_pt;
 
-  DENTER("adapt_create_inferior()");
-
   if (args && *args)
     error ("Can't pass arguments to remote adapt process.");
 
@@ -438,13 +444,12 @@ adapt_create_inferior (execfile, args, env)
          expect_prompt ();
 #else
        insert_breakpoints ();  /* Needed to get correct instruction in cache */
-       proceed(entry_pt, -1, 0);
+       proceed(entry_pt, TARGET_SIGNAL_DEFAULT, 0);
 #endif
 
   } else {
        printf_filtered("Adapt not open yet.\n");
   }
-  DEXIT("adapt_create_inferior()");
 }
 
 /* Translate baud rates from integers to damn B_codes.  Unix should
@@ -503,7 +508,6 @@ adapt_open (name, from_tty)
   unsigned int prl;
   char *p;
 
-  DENTER("adapt_open()");
   /* Find the first whitespace character, it separates dev_name from
      prog_name.  */
   if (name == 0)
@@ -517,7 +521,7 @@ erroid:
     error ("\
 Please include the name of the device for the serial port,\n\
 the baud rate, and the name of the program to run on the remote system.");
-  dev_name = (char*)malloc(p - name + 1);
+  dev_name = (char*)xmalloc(p - name + 1);
   strncpy (dev_name, name, p - name);
   dev_name[p - name] = '\0';
 
@@ -544,6 +548,7 @@ the baud rate, and the name of the program to run on the remote system.");
   if (adapt_desc < 0)
     perror_with_name (dev_name);
   ioctl (adapt_desc, TIOCGETP, &sg);
+#if ! defined(COMPILE_CHECK) 
 #ifdef HAVE_TERMIO
   sg.c_cc[VMIN] = 0;           /* read with timeout.  */
   sg.c_cc[VTIME] = timeout * 10;
@@ -558,10 +563,8 @@ the baud rate, and the name of the program to run on the remote system.");
 
   ioctl (adapt_desc, TIOCSETP, &sg);
   adapt_stream = fdopen (adapt_desc, "r+");
-
+#endif /* compile_check */
   push_target (&adapt_ops);
-  /* start_remote ();              /* Initialize gdb process mechanisms */
-
 
 #ifndef HAVE_TERMIO
 #ifndef NO_SIGINTERRUPT
@@ -595,32 +598,15 @@ the baud rate, and the name of the program to run on the remote system.");
   /* Clear any break points */
   adapt_clear_breakpoints();
 
-  /* Determine the processor revision level */
-  prl = (unsigned int)read_register(CFG_REGNUM) >> 24;
-  if (prl == 0x03) { 
-       processor_type = TYPE_A29000;  
-  } else if ((prl&0xf0) == 0x40) {     /* 29030 = 0x4* */
-       processor_type = TYPE_A29030;  
-       fprintf_filtered(stderr,"WARNING: debugging of A29030 not tested.\n");
-  } else if ((prl&0xf0) == 0x20) {     /* 29050 = 0x2* */
-       processor_type = TYPE_A29050;  
-       fprintf_filtered(stderr,"WARNING: debugging of A29050 not tested.\n");
-  } else {
-       processor_type = TYPE_UNKNOWN;  
-       fprintf_filtered(stderr,"WARNING: processor type unknown.\n");
-  }
-
   /* Print out some stuff, letting the user now what's going on */
-  printf_filtered("Remote debugging on an %s connect to an Adapt via %s.\n",
-               processor_name[processor_type],dev_name);
+  printf_filtered("Connected to an Adapt via %s.\n", dev_name);
     /* FIXME: can this restriction be removed? */
   printf_filtered("Remote debugging using virtual addresses works only\n");
   printf_filtered("\twhen virtual addresses map 1:1 to physical addresses.\n"); 
-  if (processor_type != TYPE_A29050) {
+  if (processor_type != a29k_freeze_mode) {
        fprintf_filtered(stderr,
        "Freeze-mode debugging not available, and can only be done on an A29050.\n");
   }
-  DEXIT("adapt_open()");
 }
 
 /* Close out all files and local state before this target loses control. */
@@ -630,8 +616,6 @@ adapt_close (quitting)
      int quitting;
 {
 
-  DENTER("adapt_close()");
-
   /* Clear any break points */
   adapt_clear_breakpoints();
 
@@ -663,7 +647,6 @@ adapt_close (quitting)
     log_file = NULL;
   }
 #endif
-  DEXIT("adapt_close()");
 }
 
 /* Attach to the target that is already loaded and possibly running */
@@ -673,26 +656,12 @@ adapt_attach (args, from_tty)
      int from_tty;
 {
 
-  DENTER("adapt_attach()");
   if (from_tty)
       printf_filtered ("Attaching to remote program %s.\n", prog_name);
 
-  /* push_target(&adapt_ops);  /* This done in adapt_open() */
-
-  mark_breakpoints_out ();
-
   /* Send the adapt a kill. It is ok if it is not already running */
   fprintf(adapt_stream, "K\r"); fflush(adapt_stream);
   expect_prompt();             /* Slurp the echo */
-
-  /* We will get a task spawn event immediately.  */
-  init_wait_for_inferior ();
-  clear_proceed_status ();
-  stop_soon_quietly = 1;
-  wait_for_inferior ();
-  stop_soon_quietly = 0;
-  normal_stop ();
-  DEXIT("adapt_attach()");
 }
 
 
@@ -704,7 +673,7 @@ adapt_detach (args,from_tty)
      char *args;
      int from_tty;
 {
-  DENTER("adapt_detach()");
+
   if (adapt_stream) { /* Send it on its way (tell it to continue)  */
        adapt_clear_breakpoints();
        fprintf(adapt_stream,"G\r");
@@ -713,16 +682,15 @@ adapt_detach (args,from_tty)
   pop_target();                /* calls adapt_close to do the real work */
   if (from_tty)
     printf_filtered ("Ending remote %s debugging\n", target_shortname);
-  DEXIT("adapt_detach()");
 }
  
 /* Tell the remote machine to resume.  */
 
 void
-adapt_resume (step, sig)
-     int step, sig;
+adapt_resume (pid, step, sig)
+     int pid, step;
+     enum target_signal sig;
 {
-  DENTER("adapt_resume()");
   if (step)    
     {
       write (adapt_desc, "t 1,s\r", 6);
@@ -744,7 +712,6 @@ adapt_resume (step, sig)
       /* Swallow the echo.  */
       expect_prompt(); 
     }
-  DEXIT("adapt_resume()");
 }
 
 /* Wait until the remote machine stops, then return,
@@ -752,7 +719,7 @@ adapt_resume (step, sig)
 
 int
 adapt_wait (status)
-     WAITTYPE *status;
+     struct target_waitstatus *status;
 {
   /* Strings to look for.  '?' means match any single character.  
      Note that with the algorithm we use, the initial character
@@ -777,13 +744,13 @@ adapt_wait (status)
   int old_timeout = timeout;
   int old_immediate_quit = immediate_quit;
 
-  DENTER("adapt_wait()");
-
-  WSETEXIT ((*status), 0);
+  status->kind = TARGET_WAITKIND_EXITED;
+  status->value.integer = 0;
 
   if (need_artificial_trap != 0)
     {
-      WSETSTOP ((*status), SIGTRAP);
+      status->kind = TARGET_WAITKIND_STOPPED;
+      status->value.sig = TARGET_SIGNAL_TRAP;
       need_artificial_trap--;
       return 0;
     }
@@ -824,12 +791,17 @@ adapt_wait (status)
   }
   expect_prompt ();
   if (*bp== '\0')
-    WSETSTOP ((*status), SIGTRAP);
+    {
+      status->kind = TARGET_WAITKIND_STOPPED;
+      status->value.sig = TARGET_SIGNAL_TRAP;
+    }
   else
-    WSETEXIT ((*status), 0);
+    {
+      status->kind = TARGET_WAITKIND_EXITED;
+      status->value.integer = 0;
+    }
   timeout = old_timeout;
   immediate_quit = old_immediate_quit;
-  DEXIT("adapt_wait()");
   return 0;
 }
 
@@ -881,8 +853,6 @@ adapt_fetch_registers ()
   int  sreg_buf[16];
   int i,j;
 
-  DENTER("adapt_fetch_registers()");
-
 /* 
  * Global registers
  */
@@ -952,7 +922,7 @@ adapt_fetch_registers ()
          sreg_buf[12] = read_register(PC2_REGNUM);     /* pc2 */
   }
   for (i=0 ; i<14 ; i++)               /* Supply vab -> lru */
-       supply_register(VAB_REGNUM+i,&sreg_buf[i]);
+       supply_register(VAB_REGNUM+i, (char *) &sreg_buf[i]);
   sprintf (tempbuf, "dw sr128\r");
   write (adapt_desc, tempbuf, strlen (tempbuf));
   for (i=0 ; i<2 ; i++) {                      /* SR128 - SR135 */
@@ -962,30 +932,28 @@ adapt_fetch_registers ()
                sreg_buf[i*4 + j] = get_hex_word();
   }            
   expect_prompt();
-  supply_register(IPC_REGNUM,&sreg_buf[0]);
-  supply_register(IPA_REGNUM,&sreg_buf[1]);
-  supply_register(IPB_REGNUM,&sreg_buf[2]);
-  supply_register(Q_REGNUM,  &sreg_buf[3]);
+  supply_register(IPC_REGNUM,(char *) &sreg_buf[0]);
+  supply_register(IPA_REGNUM,(char *) &sreg_buf[1]);
+  supply_register(IPB_REGNUM,(char *) &sreg_buf[2]);
+  supply_register(Q_REGNUM,  (char *) &sreg_buf[3]);
                /* Skip ALU */
-  supply_register(BP_REGNUM, &sreg_buf[5]);
-  supply_register(FC_REGNUM, &sreg_buf[6]);
-  supply_register(CR_REGNUM, &sreg_buf[7]);
+  supply_register(BP_REGNUM, (char *) &sreg_buf[5]);
+  supply_register(FC_REGNUM, (char *) &sreg_buf[6]);
+  supply_register(CR_REGNUM, (char *) &sreg_buf[7]);
 
   /* There doesn't seem to be any way to get these.  */
   {
     int val = -1;
-    supply_register (FPE_REGNUM, &val);
-    supply_register (INT_REGNUM, &val);
-    supply_register (FPS_REGNUM, &val);
-    supply_register (EXO_REGNUM, &val);
+    supply_register (FPE_REGNUM, (char *) &val);
+    supply_register (INTE_REGNUM, (char *) &val);
+    supply_register (FPS_REGNUM, (char *) &val);
+    supply_register (EXO_REGNUM, (char *) &val);
   }
 
   write (adapt_desc, "dw gr1,gr1\r", 11);
   expect ("GR001 ");
   get_hex_regs (1, GR1_REGNUM);
   expect_prompt ();
-
-  DEXIT("adapt_fetch_registers()");
 }
 
 /* Fetch register REGNO, or all registers if REGNO is -1.
@@ -994,7 +962,6 @@ static void
 adapt_fetch_register (regno)
      int regno;
 {
-  DENTER("adapt_fetch_register()");
   if (regno == -1)
     adapt_fetch_registers ();
   else
@@ -1006,17 +973,15 @@ adapt_fetch_register (regno)
       get_hex_regs (1, regno);
       expect_prompt ();
     }
-  DEXIT("adapt_fetch_register()");
 }
 
 /* Store the remote registers from the contents of the block REGS.  */
 
-static int 
+static void
 adapt_store_registers ()
 {
   int i, j;
 
-  DENTER("adapt_store_registers()");
   fprintf (adapt_stream, "s gr1,%x\r", read_register (GR1_REGNUM));
   expect_prompt ();
 
@@ -1068,7 +1033,7 @@ adapt_store_registers ()
 
 /* Store register REGNO, or all if REGNO == -1.
    Return errno value.  */
-int
+void
 adapt_store_register (regno)
      int regno;
 {
@@ -1089,8 +1054,6 @@ adapt_store_register (regno)
        registers_changed ();
       expect_prompt ();
     }
-  DEXIT("adapt_store_registers()");
-  return 0;
 }
 
 /* Get ready to modify the registers array.  On machines which store
@@ -1163,9 +1126,7 @@ adapt_write_inferior_memory (memaddr, myaddr, len)
   int i;
   unsigned int cps;
 
-  /* DENTER("adapt_write_inferior_memory()"); */
-
-/* Turn TU bit off so we can do 'sb' commands */
+  /* Turn TU bit off so we can do 'sb' commands */
   cps = read_register(CPS_REGNUM);
   if (cps & 0x00000800)
        write_register(CPS_REGNUM,cps&~(0x00000800));
@@ -1185,7 +1146,6 @@ adapt_write_inferior_memory (memaddr, myaddr, len)
   /* Restore the old value of cps if the TU bit was on */
   if (cps & 0x00000800)
        write_register(CPS_REGNUM,cps);
-  /* DEXIT("adapt_write_inferior_memory()"); */
   return len;
 }
 
@@ -1217,7 +1177,6 @@ adapt_read_inferior_memory(memaddr, myaddr, len)
      adapt_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
      doesn't need to work.  Detect it and give up if there's an attempt
      to do that.  */
-  /* DENTER("adapt_read_inferior_memory()"); */
 
   if (((memaddr - 1) + len) < memaddr)
     return EIO;
@@ -1262,8 +1221,6 @@ adapt_read_inferior_memory(memaddr, myaddr, len)
 
       startaddr += len_this_pass;
     }
-
-  /* DEXIT("adapt_read_inferior_memory()"); */
   return count;
 }
 
@@ -1274,18 +1231,15 @@ adapt_insert_breakpoint(addr, save)
 CORE_ADDR      addr;
 char           *save;  /* Throw away, let adapt save instructions */
 {
-  DENTER("adapt_insert_breakpoint()"); 
   if (num_brkpts < MAX_BREAKS) {
        num_brkpts++;
        fprintf (adapt_stream, "B %x", addr);
        fprintf (adapt_stream, "\r");
        expect_prompt ();
-       DEXIT("adapt_insert_breakpoint() success"); 
        return(0);      /* Success */
   } else {
        fprintf_filtered(stderr,
                "Too many break points, break point not installed\n");
-       DEXIT("adapt_insert_breakpoint() failure"); 
        return(1);      /* Failure */
   }
 
@@ -1295,7 +1249,6 @@ adapt_remove_breakpoint(addr, save)
 CORE_ADDR      addr;
 char           *save;  /* Throw away, let adapt save instructions */
 {
-  DENTER("adapt_remove_breakpoint()");
   if (num_brkpts > 0) {
          num_brkpts--;
          fprintf (adapt_stream, "BR %x", addr);
@@ -1303,7 +1256,6 @@ char              *save;  /* Throw away, let adapt save instructions */
          fflush (adapt_stream);
          expect_prompt ();
   }
-  DEXIT("adapt_remove_breakpoint()");
   return(0);
 }
 
@@ -1311,7 +1263,6 @@ char              *save;  /* Throw away, let adapt save instructions */
 static int
 adapt_clear_breakpoints() 
 { 
-  DENTER("adapt_clear_breakpoint()");
   if (adapt_stream) {
        fprintf (adapt_stream, "BR");   /* Clear all break points */
        fprintf (adapt_stream, "\r");
@@ -1319,16 +1270,13 @@ adapt_clear_breakpoints()
        expect_prompt ();
   }
   num_brkpts = 0;
-  DEXIT("adapt_clear_breakpoint()");
 }
 static void
 adapt_mourn() 
 { 
-  DENTER("adapt_mourn()");
   adapt_clear_breakpoints();
   pop_target ();                /* Pop back to no-child state */
   generic_mourn_inferior ();
-  DEXIT("adapt_mourn()");
 }
 
 /* Display everthing we read in from the adapt until we match/see the
@@ -1404,7 +1352,7 @@ adapt_com (args, fromtty)
                break;
        /* Begin commands that take input in the form 'c x,y[,z...]' */
        case 'S':       /* Set memory or register */
-               if (index(args,',')) {  /* Assume it is properly formatted */
+               if (strchr(args,',')) { /* Assume it is properly formatted */
                        write(adapt_desc,args,strlen(args));
                        write(adapt_desc,"\r",1);
                        expect_prompt();
@@ -1415,32 +1363,55 @@ adapt_com (args, fromtty)
 
 /* Define the target subroutine names */
 
-struct target_ops adapt_ops = {
-       "adapt", "Remote AMD `Adapt' target",
-       "Remote debug an AMD 290*0 using an `Adapt' monitor via RS232",
-       adapt_open, adapt_close, 
-       adapt_attach, adapt_detach, adapt_resume, adapt_wait,
-       adapt_fetch_register, adapt_store_register,
-       adapt_prepare_to_store, 0, 0,   /* conv_to, conv_from */
-       adapt_xfer_inferior_memory, 
-       adapt_files_info,
-       adapt_insert_breakpoint, adapt_remove_breakpoint, /* Breakpoints */
-       0, 0, 0, 0, 0,          /* Terminal handling */
-       adapt_kill,             /* FIXME, kill */
-       adapt_load, 
-       call_function_by_hand,
-       0,                      /* lookup_symbol */
-       adapt_create_inferior,  /* create_inferior */ 
-       adapt_mourn,            /* mourn_inferior FIXME */
-       process_stratum, 0, /* next */
-       1, 1, 1, 1, 1,  /* all mem, mem, stack, regs, exec */
-       0,0,            /* Section pointers */
-       OPS_MAGIC,              /* Always the last thing */
-};
+struct target_ops adapt_ops ;
+static void init_adapt_ops(void)
+{
+  adapt_ops.to_shortname =     "adapt";
+  adapt_ops.to_longname =      "Remote AMD `Adapt' target";
+  adapt_ops.to_doc =   "Remote debug an AMD 290*0 using an `Adapt' monitor via RS232";
+  adapt_ops.to_open =  adapt_open;
+  adapt_ops.to_close =         adapt_close;
+  adapt_ops.to_attach = adapt_attach;
+  adapt_ops.to_detach = adapt_detach;
+  adapt_ops.to_resume = adapt_resume;
+  adapt_ops.to_wait  =         adapt_wait;
+  adapt_ops.to_fetch_registers  = adapt_fetch_register;
+  adapt_ops.to_store_registers  = adapt_store_register;
+  adapt_ops.to_prepare_to_store = adapt_prepare_to_store;
+  adapt_ops.to_xfer_memory  =  adapt_xfer_inferior_memory;
+  adapt_ops.to_files_info  =   adapt_files_info;
+  adapt_ops.to_insert_breakpoint = adapt_insert_breakpoint;
+  adapt_ops.to_remove_breakpoint = adapt_remove_breakpoint; 
+  adapt_ops.to_terminal_init  =        0;
+  adapt_ops.to_terminal_inferior =     0;
+  adapt_ops.to_terminal_ours_for_output =      0;
+  adapt_ops.to_terminal_ours  =        0;
+  adapt_ops.to_terminal_info  =        0;
+  adapt_ops.to_kill  =         adapt_kill;             
+  adapt_ops.to_load  =         adapt_load;
+  adapt_ops.to_lookup_symbol =         0;              
+  adapt_ops.to_create_inferior =  adapt_create_inferior;       
+  adapt_ops.to_mourn_inferior =   adapt_mourn;                 
+  adapt_ops.to_can_run  =      0; 
+  adapt_ops.to_notice_signals =        0;
+  adapt_ops.to_thread_alive  =         0;
+  adapt_ops.to_stop  =         0 ; /* process_stratum; */
+  adapt_ops.to_stratum =       0; 
+  adapt_ops.DONT_USE =         0 ;
+  adapt_ops.to_has_all_memory =        1;
+  adapt_ops.to_has_memory =    1;
+  adapt_ops.to_has_stack =     1;
+  adapt_ops.to_has_registers =         1;
+  adapt_ops.to_has_execution =         0;
+  adapt_ops.to_sections =      0;
+  adapt_ops.to_sections_end =  0 ;
+  adapt_ops.to_magic =         OPS_MAGIC; 
+} /* init_adapt_ops */
 
 void
 _initialize_remote_adapt ()
 {
+  init_adapt_ops() ;
   add_target (&adapt_ops);
   add_com ("adapt <command>", class_obscure, adapt_com,
        "Send a command to the AMD Adapt remote monitor.");
This page took 0.031992 seconds and 4 git commands to generate.