Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com>
authorJohn Metzler <jmetzler@cygnus>
Thu, 21 May 1998 20:20:39 +0000 (20:20 +0000)
committerJohn Metzler <jmetzler@cygnus>
Thu, 21 May 1998 20:20:39 +0000 (20:20 +0000)
* gnu-nat.c (init_gnu_ops): Initialization of target ops by assignment.
(_initialize_gnu_nat):      Call new init
* mac-nat.c (init_child_ops):          Ditto
(_initialize_mac_nat):                 Ditto
* monitor.c (init_base_monitor_ops):   Ditto
(_initialize_remote_monitors) :        Ditto
* ppc-bdm.c (init_bdm_ppc_ops):        Ditto
(_initialize_bdm_ppc):                 Ditto
* remote-adapt.c ( init_adapt_ops):    Ditto
(_initialize_remote_adapt):            Ditto
* remote-array.c (init_array_ops) :    Ditto
(_initialize_array):                   Ditto
* remote-bug (init_bug_ops) :          Ditto
(_initialize_remote_bug):              Ditto
* remote-e7000.c (init_e7000_ops):     Ditto
(_initialize_remote_e7000) :           Ditto
* remote-eb.c (init_eb_ops) :          Ditto
(_initialize_remote_eb) :              Ditto
*remote-es.c (init_es1800_ops) :       Ditto
(init_es1800_child_ops) :              Ditto
(_initialize_es1800) ;                 Ditto
*remote-hms.c (init_hms_ops):          Ditto
(_initialize_remote_hms) :             Ditto
* remote-mm.c (init_mm_ops):           Ditto
(_initialize_remote_mm) :              Ditto
* remote-nindy.c (init_nindy_ops):     Ditto
(_initialize_nindy):                   Ditto
* remote_nrom.c (init_nrom_ops) :      Ditto
(_initialize_remote_nrom) :            Ditto
*remote-os9k (init_rombug_ops) :       Ditto
(_initialize_remote_os9k) :            Ditto
*remote-rdi.c (init_rdi_ops) :         Ditto
(_initialize_remote_rdi) :             Ditto
* remote-rdp.c (init_remote_rdp_ops) : Ditto
(_initialize_remote_rdp) :             Ditto
* remote-sds.c (init_sds_ops) :        Ditto
(_initialize_remote_sds) :             Ditto
* remote-sim.c (init_gdbsim_ops) :     Ditto
(_initialize_remote_sim) :             Ditto
* remote-st.c (init_st2000_ops):       Ditto
(_initialize_remote_st2000):           Ditto
*remote-udi.c (init_udi_ops) :         Ditto
(_initialize_remote_udi) :             Ditto
* remote-vx.c (init_vx_ops) :          Ditto
(init_vx_run_ops) :                    Ditto
(_initialize_vx) :                     Ditto
* remote.c (init_remote_ops):          Ditto
(init_extended_remote_ops):            Ditto
(_initialize_remote):                  Ditto
* sparcl-tdep.c (init_sparclite_ops):  Ditto
(_initialize_sparcl_tdep):             Ditto
* v850ice.c (init_850ice_ops):         Ditto
(_initialize_v850ice):                 Ditto
*win32-nat.c: (init_child_ops):        Ditto
(_initialize_inftarg):                 Ditto

24 files changed:
gdb/ChangeLog
gdb/gnu-nat.c
gdb/mac-nat.c
gdb/ppc-bdm.c
gdb/remote-adapt.c
gdb/remote-array.c
gdb/remote-bug.c
gdb/remote-eb.c
gdb/remote-es.c
gdb/remote-hms.c
gdb/remote-mm.c
gdb/remote-nindy.c
gdb/remote-os9k.c
gdb/remote-rdi.c
gdb/remote-rdp.c
gdb/remote-sds.c
gdb/remote-sim.c
gdb/remote-st.c
gdb/remote-udi.c
gdb/remote-vx.c
gdb/remote.c
gdb/sparcl-tdep.c
gdb/v850ice.c
gdb/win32-nat.c

index e88663f..6cc8cde 100644 (file)
@@ -1,3 +1,60 @@
+Thu May 21 13:14:25 1998  John Metzler  <jmetzler@cygnus.com>
+       * gnu-nat.c (init_gnu_ops): Initialization of target ops by assignment.
+       (_initialize_gnu_nat):      Call new init
+       * mac-nat.c (init_child_ops):          Ditto
+       (_initialize_mac_nat):                 Ditto
+       * monitor.c (init_base_monitor_ops):   Ditto
+       (_initialize_remote_monitors) :        Ditto
+       * ppc-bdm.c (init_bdm_ppc_ops):        Ditto
+       (_initialize_bdm_ppc):                 Ditto
+       * remote-adapt.c ( init_adapt_ops):    Ditto
+       (_initialize_remote_adapt):            Ditto
+       * remote-array.c (init_array_ops) :    Ditto
+       (_initialize_array):                   Ditto
+       * remote-bug (init_bug_ops) :          Ditto
+       (_initialize_remote_bug):              Ditto
+       * remote-e7000.c (init_e7000_ops):     Ditto
+       (_initialize_remote_e7000) :           Ditto
+       * remote-eb.c (init_eb_ops) :          Ditto
+       (_initialize_remote_eb) :              Ditto
+       *remote-es.c (init_es1800_ops) :       Ditto
+       (init_es1800_child_ops) :              Ditto
+       (_initialize_es1800) ;                 Ditto
+       *remote-hms.c (init_hms_ops):          Ditto
+       (_initialize_remote_hms) :             Ditto
+       * remote-mm.c (init_mm_ops):           Ditto
+       (_initialize_remote_mm) :              Ditto
+       * remote-nindy.c (init_nindy_ops):     Ditto
+       (_initialize_nindy):                   Ditto
+       * remote_nrom.c (init_nrom_ops) :      Ditto
+       (_initialize_remote_nrom) :            Ditto
+       *remote-os9k (init_rombug_ops) :       Ditto
+       (_initialize_remote_os9k) :            Ditto
+       *remote-rdi.c (init_rdi_ops) :         Ditto
+       (_initialize_remote_rdi) :             Ditto
+       * remote-rdp.c (init_remote_rdp_ops) : Ditto
+       (_initialize_remote_rdp) :             Ditto
+       * remote-sds.c (init_sds_ops) :        Ditto
+       (_initialize_remote_sds) :             Ditto
+       * remote-sim.c (init_gdbsim_ops) :     Ditto
+       (_initialize_remote_sim) :             Ditto
+       * remote-st.c (init_st2000_ops):       Ditto
+       (_initialize_remote_st2000):           Ditto
+       *remote-udi.c (init_udi_ops) :         Ditto
+       (_initialize_remote_udi) :             Ditto
+       * remote-vx.c (init_vx_ops) :          Ditto
+       (init_vx_run_ops) :                    Ditto
+       (_initialize_vx) :                     Ditto
+       * remote.c (init_remote_ops):          Ditto
+       (init_extended_remote_ops):            Ditto
+       (_initialize_remote):                  Ditto
+       * sparcl-tdep.c (init_sparclite_ops):  Ditto
+       (_initialize_sparcl_tdep):             Ditto
+       * v850ice.c (init_850ice_ops):         Ditto
+       (_initialize_v850ice):                 Ditto
+       *win32-nat.c: (init_child_ops):        Ditto
+       (_initialize_inftarg):                 Ditto
+
 Wed May 20 15:29:41 1998  Gavin Koch  <gavin@cygnus.com>
 
        * mips/tm-tx39.h (MIPS_DEFAULT_FPU_TYPE): Defined as MIPS_FPU_NONE.
index 367302d..cfd2a81 100644 (file)
@@ -67,7 +67,6 @@
 #include "notify_S.h"
 #include "process_reply_S.h"
 #include "msg_reply_S.h"
-
 #include "exc_request_U.h"
 #include "msg_U.h"
 
@@ -2341,49 +2340,52 @@ gnu_xfer_memory (memaddr, myaddr, len, write, target)
 extern void gnu_store_registers (int regno);
 extern void gnu_fetch_registers (int regno);
 
-struct target_ops gnu_ops = {
-  "GNU",                       /* to_shortname */
-  "GNU Hurd process",          /* to_longname */
-  "GNU Hurd process",          /* to_doc */
-  gnu_open,                    /* to_open */
-  0,                           /* to_close */
-  gnu_attach,                  /* to_attach */
-  gnu_detach,                  /* to_detach */
-  gnu_resume,                  /* to_resume */
-  gnu_wait,                    /* to_wait */
-  gnu_fetch_registers,         /* to_fetch_registers */
-  gnu_store_registers,         /* to_store_registers */
-  gnu_prepare_to_store,                /* to_prepare_to_store */
-  gnu_xfer_memory,             /* to_xfer_memory */
-  0,                           /* to_files_info */
-  memory_insert_breakpoint,    /* to_insert_breakpoint */
-  memory_remove_breakpoint,    /* to_remove_breakpoint */
-  gnu_terminal_init_inferior,  /* to_terminal_init */
-  terminal_inferior,           /* to_terminal_inferior */
-  terminal_ours_for_output,    /* to_terminal_ours_for_output */
-  terminal_ours,               /* to_terminal_ours */
-  child_terminal_info,         /* to_terminal_info */
-  gnu_kill_inferior,           /* to_kill */
-  0,                           /* to_load */
-  0,                           /* to_lookup_symbol */
-
-  gnu_create_inferior,         /* to_create_inferior */
-  gnu_mourn_inferior,          /* to_mourn_inferior */
-  gnu_can_run,                 /* to_can_run */
-  0,                           /* to_notice_signals */
-  gnu_thread_alive,            /* to_thread_alive */
-  gnu_stop,                    /* to_stop */
-  process_stratum,             /* to_stratum */
-  0,                           /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  0,                           /* sections */
-  0,                           /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+struct target_ops gnu_ops ;
+
+static void
+init_gnu_ops(void)
+{
+  gnu_ops.to_shortname =   "GNU";              /* to_shortname */
+  gnu_ops.to_longname =   "GNU Hurd process";  /* to_longname */
+  gnu_ops.to_doc =   "GNU Hurd process";       /* to_doc */
+  gnu_ops.to_open =   gnu_open;                        /* to_open */
+  gnu_ops.to_close =   0;                      /* to_close */
+  gnu_ops.to_attach =   gnu_attach;            /* to_attach */
+  gnu_ops.to_detach =   gnu_detach;            /* to_detach */
+  gnu_ops.to_resume =   gnu_resume;            /* to_resume */
+  gnu_ops.to_wait  =   gnu_wait;               /* to_wait */
+  gnu_ops.to_fetch_registers  =   gnu_fetch_registers; /* to_fetch_registers */
+  gnu_ops.to_store_registers  =   gnu_store_registers; /* to_store_registers */
+  gnu_ops.to_prepare_to_store =   gnu_prepare_to_store;        /* to_prepare_to_store */
+  gnu_ops.to_xfer_memory  =   gnu_xfer_memory; /* to_xfer_memory */
+  gnu_ops.to_files_info  =   0;                        /* to_files_info */
+  gnu_ops.to_insert_breakpoint =   memory_insert_breakpoint;
+  gnu_ops.to_remove_breakpoint =   memory_remove_breakpoint;
+  gnu_ops.to_terminal_init  =   gnu_terminal_init_inferior;
+  gnu_ops.to_terminal_inferior =   terminal_inferior;
+  gnu_ops.to_terminal_ours_for_output =   terminal_ours_for_output;
+  gnu_ops.to_terminal_ours  =   terminal_ours;
+  gnu_ops.to_terminal_info  =   child_terminal_info;   
+  gnu_ops.to_kill  =   gnu_kill_inferior;      /* to_kill */
+  gnu_ops.to_load  =   0;                      /* to_load */
+  gnu_ops.to_lookup_symbol =   0;              /* to_lookup_symbol */
+  gnu_ops.to_create_inferior =   gnu_create_inferior;  /* to_create_inferior */
+  gnu_ops.to_mourn_inferior =   gnu_mourn_inferior;    /* to_mourn_inferior */
+  gnu_ops.to_can_run  =   gnu_can_run;         /* to_can_run */
+  gnu_ops.to_notice_signals =   0;             /* to_notice_signals */
+  gnu_ops.to_thread_alive  =   gnu_thread_alive;/* to_thread_alive */
+  gnu_ops.to_stop  =   gnu_stop;               /* to_stop */
+  gnu_ops.to_stratum =   process_stratum;      /* to_stratum */
+  gnu_ops.DONT_USE =   0;                      /* to_next */
+  gnu_ops.to_has_all_memory =   1;             /* to_has_all_memory */
+  gnu_ops.to_has_memory =   1;                 /* to_has_memory */
+  gnu_ops.to_has_stack =   1;                  /* to_has_stack */
+  gnu_ops.to_has_registers =   1;              /* to_has_registers */
+  gnu_ops.to_has_execution =   1;              /* to_has_execution */
+  gnu_ops.to_sections =   0;                   /* sections */
+  gnu_ops.to_sections_end =   0;               /* sections_end */
+  gnu_ops.to_magic =   OPS_MAGIC ;             /* to_magic */
+} /* init_gnu_ops */
 \f
 /* Return printable description of proc.  */
 char *proc_string (struct proc *proc)
@@ -3132,9 +3134,8 @@ void
 _initialize_gnu_nat ()
 {
   proc_server = getproc ();
-
+  init_gnu_ops() ;
   add_target (&gnu_ops);
-
   add_task_commands ();
   add_thread_commands ();
 
index b31772d..178b215 100644 (file)
@@ -332,54 +332,55 @@ info_proc (args, from_tty)
     }
 }
 
-struct target_ops child_ops =
+struct target_ops child_ops ;
+static void init_child_ops(void)
 {
-  "mac",                       /* to_shortname */
-  "MacOS application",         /* to_longname */
-  "MacOS application (started by the \"run\" command).",       /* to_doc */
-  child_open,                  /* to_open */
-  child_close,                 /* to_close */
-  child_attach,                        /* to_attach */
-  child_detach,                        /* to_detach */
-  child_resume,                        /* to_resume */
-  child_wait,                  /* to_wait */
-  child_fetch_inferior_registers,/* to_fetch_registers */
-  child_store_inferior_registers,/* to_store_registers */
-  child_prepare_to_store,      /* to_prepare_to_store */
-  child_xfer_memory,           /* to_xfer_memory */
-  child_files_info,            /* to_files_info */
-  memory_insert_breakpoint,    /* to_insert_breakpoint */
-  memory_remove_breakpoint,    /* to_remove_breakpoint */
-  0,                           /* to_terminal_init */
-  0,                           /* to_terminal_inferior */
-  0,                           /* to_terminal_ours_for_output */
-  0,                           /* to_terminal_ours */
-  0,                           /* to_terminal_info */
-  child_kill_inferior,         /* to_kill */
-  0,                           /* to_load */
-  0,                           /* to_lookup_symbol */
-  child_create_inferior,       /* to_create_inferior */
-  child_mourn_inferior,                /* to_mourn_inferior */
-  child_can_run,               /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  child_stop,                  /* to_stop */
-  process_stratum,             /* to_stratum */
-  0,                           /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  0,                           /* to_sections */
-  0,                           /* to_sections_end */
-  OPS_MAGIC                    /* to_magic */
+  child_ops.to_shortname =   "mac";            
+  child_ops.to_longname =   "MacOS application";
+  child_ops.to_doc    =  "MacOS application (started by the \"run\" command).";
+  child_ops.to_open   =  child_open; 
+  child_ops.to_close  =  child_close;
+  child_ops.to_attach =  child_attach;
+  child_ops.to_detach =  child_detach;
+  child_ops.to_resume =  child_resume;
+  child_ops.to_wait   =  child_wait;   
+  child_ops.to_fetch_registers  =   child_fetch_inferior_registers;
+  child_ops.to_store_registers  =   child_store_inferior_registers;
+  child_ops.to_prepare_to_store =   child_prepare_to_store;
+  child_ops.to_xfer_memory =   child_xfer_memory;              
+  child_ops.to_files_info  =   child_files_info;               
+  child_ops.to_insert_breakpoint =   memory_insert_breakpoint; 
+  child_ops.to_remove_breakpoint =   memory_remove_breakpoint; 
+  child_ops.to_terminal_init  =   0;                           
+  child_ops.to_terminal_inferior =   0;                                
+  child_ops.to_terminal_ours_for_output =  0;
+  child_ops.to_terminal_ours  =   0;                   
+  child_ops.to_terminal_info  =   0;                   
+  child_ops.to_kill  =   child_kill_inferior;  
+  child_ops.to_load  =   0;    
+  child_ops.to_lookup_symbol   = 0;                    
+  child_ops.to_create_inferior = child_create_inferior;
+  child_ops.to_mourn_inferior  = child_mourn_inferior;         
+  child_ops.to_can_run         = child_can_run;
+  child_ops.to_notice_signals =  0;      
+  child_ops.to_thread_alive  =   0;       
+  child_ops.to_stop  =   child_stop;      
+  child_ops.to_stratum =   process_stratum;
+  child_ops.DONT_USE =   0; 
+  child_ops.to_has_all_memory = 1; 
+  child_ops.to_has_memory     = 1; 
+  child_ops.to_has_stack      = 1; 
+  child_ops.to_has_registers  = 1; 
+  child_ops.to_has_execution  = 1; 
+  child_ops.to_sections       = 0; 
+  child_ops.to_sections_end   = 0; 
+  child_ops.to_magic =   OPS_MAGIC;
 };
 
 void
 _initialize_mac_nat ()
 {
-  add_target (&child_ops);
+  init_child_ops() ;
 
   add_info ("proc", info_proc,
            "Show information about processes.");
index 6731e9a..0dec6d2 100644 (file)
@@ -306,54 +306,58 @@ bdm_ppc_store_registers (regno)
 \f
 /* Define the target subroutine names */
 
-struct target_ops bdm_ppc_ops = {
-  "ocd",                       /* to_shortname */
-  "Remote target with On-Chip Debugging",      /* to_longname */
-  "Use a remote target with On-Chip Debugging.  To use a target box,\n\
+struct target_ops bdm_ppc_ops ;
+
+static void init_bdm_ppc_ops(void)
+{
+  bdm_ppc_ops.to_shortname =   "ocd";          
+  bdm_ppc_ops.to_longname =   "Remote target with On-Chip Debugging";
+  bdm_ppc_ops.to_doc =   "Use a remote target with On-Chip Debugging.  To use a target box;\n\
 specify the serial device it is connected to (e.g. /dev/ttya).  To use\n\
 a wiggler, specify wiggler and then the port it is connected to\n\
-(e.g. wiggler lpt1).", /* to_doc */
-  bdm_ppc_open,                        /* to_open */
-  ocd_close,           /* to_close */
-  NULL,                                /* to_attach */
-  ocd_detach,          /* to_detach */
-  ocd_resume,          /* to_resume */
-  bdm_ppc_wait,                        /* to_wait */
-  bdm_ppc_fetch_registers,     /* to_fetch_registers */
-  bdm_ppc_store_registers,     /* to_store_registers */
-  ocd_prepare_to_store,        /* to_prepare_to_store */
-  ocd_xfer_memory,             /* to_xfer_memory */
-  ocd_files_info,              /* to_files_info */
-  ocd_insert_breakpoint,       /* to_insert_breakpoint */
-  ocd_remove_breakpoint,       /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  ocd_kill,                    /* to_kill */
-  ocd_load,                    /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  ocd_create_inferior, /* to_create_inferior */
-  ocd_mourn,           /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  ocd_thread_alive,            /* to_thread_alive */
-  ocd_stop,                    /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+(e.g. wiggler lpt1)." ;        /* to_doc */
+  bdm_ppc_ops.to_open =   bdm_ppc_open;        
+  bdm_ppc_ops.to_close =   ocd_close;  
+  bdm_ppc_ops.to_attach =   NULL;      
+  bdm_ppc_ops.to_detach =   ocd_detach;        
+  bdm_ppc_ops.to_resume =   ocd_resume;        
+  bdm_ppc_ops.to_wait  =   bdm_ppc_wait;
+  bdm_ppc_ops.to_fetch_registers  =   bdm_ppc_fetch_registers;
+  bdm_ppc_ops.to_store_registers  =   bdm_ppc_store_registers;
+  bdm_ppc_ops.to_prepare_to_store =   ocd_prepare_to_store;    
+  bdm_ppc_ops.to_xfer_memory  =   ocd_xfer_memory;             
+  bdm_ppc_ops.to_files_info  =   ocd_files_info;               
+  bdm_ppc_ops.to_insert_breakpoint =   ocd_insert_breakpoint;  
+  bdm_ppc_ops.to_remove_breakpoint =   ocd_remove_breakpoint;  
+  bdm_ppc_ops.to_terminal_init  =   NULL;                      
+  bdm_ppc_ops.to_terminal_inferior =   NULL;                   
+  bdm_ppc_ops.to_terminal_ours_for_output =   NULL;            
+  bdm_ppc_ops.to_terminal_ours  =   NULL;                      
+  bdm_ppc_ops.to_terminal_info  =   NULL;                      
+  bdm_ppc_ops.to_kill  =   ocd_kill;           
+  bdm_ppc_ops.to_load  =   ocd_load;           
+  bdm_ppc_ops.to_lookup_symbol =   NULL;       
+  bdm_ppc_ops.to_create_inferior =   ocd_create_inferior;
+  bdm_ppc_ops.to_mourn_inferior =   ocd_mourn; 
+  bdm_ppc_ops.to_can_run  =   0;               
+  bdm_ppc_ops.to_notice_signals =   0;         
+  bdm_ppc_ops.to_thread_alive  =   ocd_thread_alive;
+  bdm_ppc_ops.to_stop  =   ocd_stop;                   
+  bdm_ppc_ops.to_stratum =   process_stratum;          
+  bdm_ppc_ops.DONT_USE =   NULL;                       
+  bdm_ppc_ops.to_has_all_memory =   1;                 
+  bdm_ppc_ops.to_has_memory =   1;                     
+  bdm_ppc_ops.to_has_stack =   1;                      
+  bdm_ppc_ops.to_has_registers =   1;                  
+  bdm_ppc_ops.to_has_execution =   1;                  
+  bdm_ppc_ops.to_sections =   NULL;                    
+  bdm_ppc_ops.to_sections_end =   NULL;                        
+  bdm_ppc_ops.to_magic =   OPS_MAGIC ;                 
+} /* init_bdm_ppc_ops */
 
 void
 _initialize_bdm_ppc ()
 {
+  init_bdm_ppc_ops() ;
   add_target (&bdm_ppc_ops);
 }
index 8fcb1f7..f66b6bd 100644 (file)
@@ -29,6 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
        o - I can't get 19200 baud rate to work. 
    7/91 o - Freeze mode tracing can be done on a 29050.  */
 
+
+
 #include "defs.h"
 #include "gdb_string.h"
 #include "inferior.h"
@@ -42,6 +44,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 */
 
@@ -85,6 +121,7 @@ rawmode(desc, turnon)
 int    desc;
 int    turnon;
 {
+  
   TERMINAL sg;
 
   if (desc < 0)
@@ -511,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;
@@ -525,7 +563,7 @@ 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);
 
 #ifndef HAVE_TERMIO
@@ -1325,34 +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,
-       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, 
-       0,                      /* lookup_symbol */
-       adapt_create_inferior,  /* create_inferior */ 
-       adapt_mourn,            /* mourn_inferior FIXME */
-       0, /* can_run */
-       0, /* notice_signals */
-       0,                      /* to_stop */
-       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.");
index 4f832a4..f7878ec 100644 (file)
@@ -122,50 +122,52 @@ serial_t array_desc = NULL;
 extern char *tmp_mips_processor_type;
 extern int mips_set_processor_type();
 
-static struct target_ops array_ops = {
-  "array",                     /* to_shortname */
-                               /* to_longname */
-  "Debug using the standard GDB remote protocol for the Array Tech target.",
-                               /* to_doc */
-  "Debug using the standard GDB remote protocol for the Array Tech target.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
-  array_open,                  /* to_open */
-  array_close,                 /* to_close */
-  NULL,                                /* to_attach */
-  array_detach,                        /* to_detach */
-  array_resume,                        /* to_resume */
-  array_wait,                  /* to_wait */
-  array_fetch_registers,       /* to_fetch_registers */
-  array_store_registers,       /* to_store_registers */
-  array_prepare_to_store,      /* to_prepare_to_store */
-  array_xfer_memory,           /* to_xfer_memory */
-  array_files_info,            /* to_files_info */
-  array_insert_breakpoint,     /* to_insert_breakpoint */
-  array_remove_breakpoint,     /* to_remove_breakpoint */
-  0,                           /* to_terminal_init */
-  0,                           /* to_terminal_inferior */
-  0,                           /* to_terminal_ours_for_output */
-  0,                           /* to_terminal_ours */
-  0,                           /* to_terminal_info */
-  array_kill,                  /* to_kill */
-  0,                           /* to_load */
-  0,                           /* to_lookup_symbol */
-  array_create_inferior,       /* to_create_inferior */
-  array_mourn_inferior,                /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                            /* to_stop */
-  process_stratum,             /* to_stratum */
-  0,                           /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  0,                           /* sections */
-  0,                           /* sections_end */
-  OPS_MAGIC                    /* to_magic */
+static struct target_ops array_ops ;
+static void init_array_ops(void)
+{
+  array_ops.to_shortname =   "array";  
+  array_ops.to_longname =              
+    "Debug using the standard GDB remote protocol for the Array Tech target.",
+    array_ops.to_doc =                         
+    "Debug using the standard GDB remote protocol for the Array Tech target.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya)." ;
+  array_ops.to_open =   array_open;    
+  array_ops.to_close =   array_close;  
+  array_ops.to_attach =   NULL;                
+  array_ops.to_detach =   array_detach;        
+  array_ops.to_resume =   array_resume;        
+  array_ops.to_wait  =   array_wait;   
+  array_ops.to_fetch_registers  =   array_fetch_registers;
+  array_ops.to_store_registers  =   array_store_registers;
+  array_ops.to_prepare_to_store =   array_prepare_to_store;
+  array_ops.to_xfer_memory  =   array_xfer_memory;             
+  array_ops.to_files_info  =   array_files_info;               
+  array_ops.to_insert_breakpoint =   array_insert_breakpoint;  
+  array_ops.to_remove_breakpoint =   array_remove_breakpoint;  
+  array_ops.to_terminal_init  =   0;                           
+  array_ops.to_terminal_inferior =   0;                                
+  array_ops.to_terminal_ours_for_output =   0;                 
+  array_ops.to_terminal_ours  =   0;                           
+  array_ops.to_terminal_info  =   0;                           
+  array_ops.to_kill  =   array_kill;           
+  array_ops.to_load  =   0;                    
+  array_ops.to_lookup_symbol =   0;            
+  array_ops.to_create_inferior =   array_create_inferior;      
+  array_ops.to_mourn_inferior =   array_mourn_inferior;                
+  array_ops.to_can_run  =   0;         
+  array_ops.to_notice_signals =   0;   
+  array_ops.to_thread_alive  =   0;    
+  array_ops.to_stop  =   0;             
+  array_ops.to_stratum =   process_stratum;    
+  array_ops.DONT_USE =   0;                    
+  array_ops.to_has_all_memory =   1;           
+  array_ops.to_has_memory =   1;               
+  array_ops.to_has_stack =   1;                        
+  array_ops.to_has_registers =   1;            
+  array_ops.to_has_execution =   1;            
+  array_ops.to_sections =   0;                 
+  array_ops.to_sections_end =   0;             
+  array_ops.to_magic =   OPS_MAGIC;            
 };
 
 /*
@@ -1462,5 +1464,6 @@ _initialize_remote_monitors ()
 void
 _initialize_array ()
 {
+  init_array_ops() ;
   add_target (&array_ops);
 }
index 4e29c0e..b8e664d 100644 (file)
@@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "remote-utils.h"
 
+
 extern int sleep();
 
 /* External data declarations */
@@ -960,35 +961,56 @@ bug_clear_breakpoints ()
   return(0);
 }
 
-struct target_ops bug_ops =
+struct target_ops bug_ops ;
+
+static void init_bug_ops(void)
 {
-  "bug", "Remote BUG monitor",
-  "Use the mvme187 board running the BUG monitor connected by a serial line.",
-
-  bug_open, gr_close,
-  0, gr_detach, bug_resume, bug_wait,  /* attach */
-  bug_fetch_register, bug_store_register,
-  gr_prepare_to_store,
-  bug_xfer_memory,
-  gr_files_info,
-  bug_insert_breakpoint, bug_remove_breakpoint,        /* Breakpoints */
-  0, 0, 0, 0, 0,               /* Terminal handling */
-  gr_kill,                     /* FIXME, kill */
-  bug_load,
-  0,                           /* lookup_symbol */
-  gr_create_inferior,          /* create_inferior */
-  gr_mourn,                    /* mourn_inferior FIXME */
-  0,                           /* can_run */
-  0,                           /* notice_signals */
-  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 */
-};
+  bug_ops.to_shortname =   "bug"; "Remote BUG monitor",
+                                   bug_ops.to_longname =   "Use the mvme187 board running the BUG monitor connected by a serial line.";
+  bug_ops.to_doc =   " ";
+  bug_ops.to_open =   bug_open;
+  bug_ops.to_close =   gr_close;
+  bug_ops.to_attach =   0;
+  bug_ops.to_detach =   gr_detach;
+  bug_ops.to_resume =   bug_resume;
+  bug_ops.to_wait  =   bug_wait;
+  bug_ops.to_fetch_registers  =   bug_fetch_register;
+  bug_ops.to_store_registers  =   bug_store_register;
+  bug_ops.to_prepare_to_store =   gr_prepare_to_store;
+  bug_ops.to_xfer_memory  =   bug_xfer_memory;
+  bug_ops.to_files_info  =   gr_files_info;
+  bug_ops.to_insert_breakpoint =   bug_insert_breakpoint;
+  bug_ops.to_remove_breakpoint =   bug_remove_breakpoint;
+  bug_ops.to_terminal_init  =   0;
+  bug_ops.to_terminal_inferior =   0;
+  bug_ops.to_terminal_ours_for_output =   0;
+  bug_ops.to_terminal_ours  =   0;
+  bug_ops.to_terminal_info  =   0;             
+  bug_ops.to_kill  =   gr_kill;                        
+  bug_ops.to_load  =   bug_load;
+  bug_ops.to_lookup_symbol =   0;                      
+  bug_ops.to_create_inferior =   gr_create_inferior;   
+  bug_ops.to_mourn_inferior =   gr_mourn;              
+  bug_ops.to_can_run  =   0;                           
+  bug_ops.to_notice_signals =   0;                     
+  bug_ops.to_thread_alive  =  0 ;
+  bug_ops.to_stop  =   0;
+  bug_ops.to_stratum =   process_stratum ;
+  bug_ops.DONT_USE =   0;
+  bug_ops.to_has_all_memory =   1;
+  bug_ops.to_has_memory =   1;
+  bug_ops.to_has_stack =   1;  
+  bug_ops.to_has_registers =   0;
+  bug_ops.to_has_execution =   0;                      
+  bug_ops.to_sections =   0 ;
+  bug_ops.to_sections_end = 0 ;
+  bug_ops.to_magic = OPS_MAGIC;                        /* Always the last thing */
+} /* init_bug_ops */
 
 void
 _initialize_remote_bug ()
 {
+  init_bug_ops() ;
   add_target (&bug_ops);
 
   add_show_from_set
index baa4d24..6fbea88 100644 (file)
@@ -974,36 +974,58 @@ eb_mourn_inferior ()
 }
 /* Define the target subroutine names */
 
-struct target_ops eb_ops = {
-       "amd-eb", "Remote serial AMD EBMON target",
-       "Use a remote computer running EBMON connected by a serial line.\n\
+struct target_ops eb_ops ;
+static void init_eb_ops(void)
+{
+  eb_ops.to_shortname =        "amd-eb";
+  eb_ops.to_longname =         "Remote serial AMD EBMON target";
+  eb_ops.to_doc =      "Use a remote computer running EBMON connected by a serial line.\n\
 Arguments are the name of the device for the serial line,\n\
 the speed to connect at in bits per second, and the filename of the\n\
 executable as it exists on the remote computer.  For example,\n\
-        target amd-eb /dev/ttya 9600 demo",
-       eb_open, eb_close, 
-       0, eb_detach, eb_resume, eb_wait,
-       eb_fetch_register, eb_store_register,
-       eb_prepare_to_store,
-       eb_xfer_inferior_memory, eb_files_info,
-       0, 0,   /* Breakpoints */
-       0, 0, 0, 0, 0,  /* Terminal handling */
-       eb_kill,
-       generic_load,   /* load */
-       0, /* lookup_symbol */
-       eb_create_inferior,
-       eb_mourn_inferior,
-       0,      /* can_run */
-       0, /* notice_signals */
-       0,                      /* to_stop */
-       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 */
+target amd-eb /dev/ttya 9600 demo",
+    eb_ops.to_open =   eb_open;
+  eb_ops.to_close =    eb_close;
+  eb_ops.to_attach =   0;
+  eb_ops.to_detach =   eb_detach;
+  eb_ops.to_resume =   eb_resume;
+  eb_ops.to_wait  =    eb_wait;
+  eb_ops.to_fetch_registers  =         eb_fetch_register;
+  eb_ops.to_store_registers  =         eb_store_register;
+  eb_ops.to_prepare_to_store =         eb_prepare_to_store;
+  eb_ops.to_xfer_memory  =     eb_xfer_inferior_memory;
+  eb_ops.to_files_info  =      eb_files_info;
+  eb_ops.to_insert_breakpoint =        0;
+  eb_ops.to_remove_breakpoint =        0;      /* Breakpoints */
+  eb_ops.to_terminal_init  =   0;
+  eb_ops.to_terminal_inferior =        0;
+  eb_ops.to_terminal_ours_for_output =         0;
+  eb_ops.to_terminal_ours  =   0;
+  eb_ops.to_terminal_info  =   0;      /* Terminal handling */
+  eb_ops.to_kill  =    eb_kill;
+  eb_ops.to_load  =    generic_load;   /* load */
+  eb_ops.to_lookup_symbol =    0; /* lookup_symbol */
+  eb_ops.to_create_inferior =  eb_create_inferior;
+  eb_ops.to_mourn_inferior =   eb_mourn_inferior;
+  eb_ops.to_can_run  =         0;      /* can_run */
+  eb_ops.to_notice_signals =           0; /* notice_signals */
+  eb_ops.to_thread_alive  =    0; /* thread-alive */
+  eb_ops.to_stop  =    0;                      /* to_stop */
+  eb_ops.to_stratum =  process_stratum;
+  eb_ops.DONT_USE =    0; /* next */
+  eb_ops.to_has_all_memory =   1;
+  eb_ops.to_has_memory =       1;
+  eb_ops.to_has_stack =        1;
+  eb_ops.to_has_registers =    1;
+  eb_ops.to_has_execution =    1;      /* all mem, mem, stack, regs, exec */
+  eb_ops.to_sections =         0; /* sections */
+  eb_ops.to_sections_end =     0; /* sections end */
+  eb_ops.to_magic =    OPS_MAGIC;              /* Always the last thing */
 };
 
 void
 _initialize_remote_eb ()
 {
+  init_eb_ops() ;
   add_target (&eb_ops);
 }
index 7aa4e9c..61c2be4 100644 (file)
@@ -2042,105 +2042,105 @@ es1800_child_detach (args, from_tty)
 
 /* Define the target subroutine names  */
 
-struct target_ops es1800_ops =
+struct target_ops es1800_ops ;
+static void init_es1800_ops(void)
 {
-  "es1800",                    /* to_shortname */
-                               /* to_longname */
-  "Remote serial target in ES1800-emulator protocol",
-                               /* to_doc */
-  "Remote debugging on the es1800 emulator via a serial line.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
-  es1800_open,                 /* to_open */
-  es1800_close,                        /* to_close */
-  es1800_attach,               /* to_attach */
-  es1800_detach,               /* to_detach */
-  es1800_resume,               /* to_resume */
-  NULL,                                /* to_wait */
-  NULL,                                /* to_fetch_registers */
-  NULL,                                /* to_store_registers */
-  es1800_prepare_to_store,     /* to_prepare_to_store */
-  es1800_xfer_inferior_memory, /* to_xfer_memory */
-  es1800_files_info,           /* to_files_info */
-  es1800_insert_breakpoint,    /* to_insert_breakpoint */
-  es1800_remove_breakpoint,    /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  NULL,                                /* to_kill */
-  es1800_load,                 /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  es1800_create_inferior,      /* to_create_inferior */
-  NULL,                                /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  core_stratum,                        /* to_stratum */
-  0,                           /* to_next */
-  0,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  0,                           /* to_has_stack */
-  0,                           /* to_has_registers */
-  0,                           /* to_has_execution */
-  NULL,                                /* to_sections */
-  NULL,                                /* to_sections_end */
-  OPS_MAGIC                    /* to_magic (always last) */
-};
+  es1800_ops.to_shortname =   "es1800";                
+  es1800_ops.to_longname =   "Remote serial target in ES1800-emulator protocol";
+  es1800_ops.to_doc =   "Remote debugging on the es1800 emulator via a serial line.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya)." ;
+  es1800_ops.to_open =   es1800_open;          
+  es1800_ops.to_close =   es1800_close;                
+  es1800_ops.to_attach =   es1800_attach;      
+  es1800_ops.to_detach =   es1800_detach;      
+  es1800_ops.to_resume =   es1800_resume;      
+  es1800_ops.to_wait  =   NULL;                        
+  es1800_ops.to_fetch_registers  =   NULL;     
+  es1800_ops.to_store_registers  =   NULL;     
+  es1800_ops.to_prepare_to_store =   es1800_prepare_to_store;
+  es1800_ops.to_xfer_memory  =   es1800_xfer_inferior_memory;
+  es1800_ops.to_files_info  =   es1800_files_info;             
+  es1800_ops.to_insert_breakpoint =   es1800_insert_breakpoint;        
+  es1800_ops.to_remove_breakpoint =   es1800_remove_breakpoint;        
+  es1800_ops.to_terminal_init  =   NULL;                       
+  es1800_ops.to_terminal_inferior =   NULL;                    
+  es1800_ops.to_terminal_ours_for_output =   NULL;             
+  es1800_ops.to_terminal_ours  =   NULL;                       
+  es1800_ops.to_terminal_info  =   NULL;                       
+  es1800_ops.to_kill  =   NULL;                        
+  es1800_ops.to_load  =   es1800_load;         
+  es1800_ops.to_lookup_symbol =   NULL;                
+  es1800_ops.to_create_inferior =   es1800_create_inferior;
+  es1800_ops.to_mourn_inferior =   NULL;                       
+  es1800_ops.to_can_run  =   0;                        
+  es1800_ops.to_notice_signals =   0;          
+  es1800_ops.to_thread_alive  =   0;           
+  es1800_ops.to_stop  =   0;                   
+  es1800_ops.to_stratum =   core_stratum;      
+  es1800_ops.DONT_USE =   0;                   
+  es1800_ops.to_has_all_memory =   0;          
+  es1800_ops.to_has_memory =   1;              
+  es1800_ops.to_has_stack =   0;               
+  es1800_ops.to_has_registers =   0;           
+  es1800_ops.to_has_execution =   0;           
+  es1800_ops.to_sections =   NULL;             
+  es1800_ops.to_sections_end =   NULL;         
+  es1800_ops.to_magic =   OPS_MAGIC ;          
+}
 
 /* Define the target subroutine names  */
 
-struct target_ops es1800_child_ops =
+struct target_ops es1800_child_ops ;
+static void init_es1800_child_ops(void)
 {
-  "es1800_process",            /* to_shortname */
-                               /* to_longname */
-  "Remote serial target in ES1800-emulator protocol",
-                               /* to_doc */
-  "Remote debugging on the es1800 emulator via a serial line.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
-  es1800_child_open,           /* to_open */
-  NULL,                                /* to_close */
-  es1800_attach,               /* to_attach */
-  es1800_child_detach,         /* to_detach */
-  es1800_resume,               /* to_resume */
-  es1800_wait,                 /* to_wait */
-  es1800_fetch_register,       /* to_fetch_registers */
-  es1800_store_register,       /* to_store_registers */
-  es1800_prepare_to_store,     /* to_prepare_to_store */
-  es1800_xfer_inferior_memory, /* to_xfer_memory */
-  es1800_files_info,           /* to_files_info */
-  es1800_insert_breakpoint,    /* to_insert_breakpoint */
-  es1800_remove_breakpoint,    /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  es1800_kill,                 /* to_kill */
-  es1800_load,                 /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  es1800_create_inferior,      /* to_create_inferior */
-  es1800_mourn_inferior,       /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  0,                           /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* to_sections */
-  NULL,                                /* to_sections_end */
-  OPS_MAGIC                    /* to_magic (always last) */
-};
+  es1800_ops.to_shortname =   "es1800_process";        
+  es1800_ops.to_longname =   "Remote serial target in ES1800-emulator protocol";
+  es1800_ops.to_doc =   "Remote debugging on the es1800 emulator via a serial line.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+  es1800_ops.to_open =   es1800_child_open;    
+  es1800_ops.to_close =   NULL;                        
+  es1800_ops.to_attach =   es1800_attach;      
+  es1800_ops.to_detach =   es1800_child_detach;        
+  es1800_ops.to_resume =   es1800_resume;      
+  es1800_ops.to_wait  =   es1800_wait;         
+  es1800_ops.to_fetch_registers  =   es1800_fetch_register;
+  es1800_ops.to_store_registers  =   es1800_store_register;
+  es1800_ops.to_prepare_to_store =   es1800_prepare_to_store;
+  es1800_ops.to_xfer_memory  =   es1800_xfer_inferior_memory;
+  es1800_ops.to_files_info  =   es1800_files_info;             
+  es1800_ops.to_insert_breakpoint =   es1800_insert_breakpoint;        
+  es1800_ops.to_remove_breakpoint =   es1800_remove_breakpoint;        
+  es1800_ops.to_terminal_init  =   NULL;                       
+  es1800_ops.to_terminal_inferior =   NULL;                    
+  es1800_ops.to_terminal_ours_for_output =   NULL;             
+  es1800_ops.to_terminal_ours  =   NULL;                       
+  es1800_ops.to_terminal_info  =   NULL;                       
+  es1800_ops.to_kill  =   es1800_kill;                 
+  es1800_ops.to_load  =   es1800_load;                 
+  es1800_ops.to_lookup_symbol =   NULL;                        
+  es1800_ops.to_create_inferior =   es1800_create_inferior;
+  es1800_ops.to_mourn_inferior =   es1800_mourn_inferior;      
+  es1800_ops.to_can_run  =   0;                                
+  es1800_ops.to_notice_signals =   0;                  
+  es1800_ops.to_thread_alive  =   0;                   
+  es1800_ops.to_stop  =   0;                           
+  es1800_ops.to_stratum =   process_stratum;           
+  es1800_ops.DONT_USE =   0;                           
+  es1800_ops.to_has_all_memory =   1;                  
+  es1800_ops.to_has_memory =   1;                      
+  es1800_ops.to_has_stack =   1;                       
+  es1800_ops.to_has_registers =   1;                   
+  es1800_ops.to_has_execution =   1;                   
+  es1800_ops.to_sections =   NULL;                     
+  es1800_ops.to_sections_end =   NULL;                 
+  es1800_ops.to_magic =   OPS_MAGIC;                   
+}
 
 void
 _initialize_es1800 ()
 {
+  init_es1800_ops() ;
+  init_es1800_child_ops() ;
   add_target (&es1800_ops);
   add_target (&es1800_child_ops);
 #ifdef PROVIDE_TRANSPARENT
index 2486505..e466122 100644 (file)
@@ -1320,33 +1320,50 @@ hms_open (name, from_tty)
 
 /* Define the target subroutine names */
 
-struct target_ops hms_ops =
+struct target_ops hms_ops ;
+static void init_hms_ops(void)
 {
-  "hms", "Remote HMS monitor",
-  "Use the H8 evaluation board running the HMS monitor connected\n\
-by a serial line.",
-
-  hms_open, hms_close,
-  0, hms_detach, hms_resume, hms_wait, /* attach */
-  hms_fetch_register, hms_store_register,
-  hms_prepare_to_store,
-  hms_xfer_inferior_memory,
-  hms_files_info,
-  hms_insert_breakpoint, hms_remove_breakpoint,                /* Breakpoints */
-  0, 0, 0, 0, 0,               /* Terminal handling */
-  hms_kill,                    /* FIXME, kill */
-  generic_load,
-  0,                           /* lookup_symbol */
-  hms_create_inferior,         /* create_inferior */
-  hms_mourn,                   /* mourn_inferior FIXME */
-  0,                           /* can_run */
-  0,                           /* notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  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 */
+  hms_ops.to_shortname =   "hms";
+  hms_ops.to_longname =   "Remote HMS monitor";
+  hms_ops.to_doc =   "Use the H8 evaluation board running the HMS monitor connected\n\
+by a serial line.";
+  hms_ops.to_open =   hms_open;
+  hms_ops.to_close =   hms_close;
+  hms_ops.to_attach =   0;
+  hms_ops.to_detach =   hms_detach;
+  hms_ops.to_resume =   hms_resume;
+  hms_ops.to_wait  =   hms_wait;
+  hms_ops.to_fetch_registers  =   hms_fetch_register;
+  hms_ops.to_store_registers  =   hms_store_register;
+  hms_ops.to_prepare_to_store =   hms_prepare_to_store;
+  hms_ops.to_xfer_memory  =   hms_xfer_inferior_memory;
+  hms_ops.to_files_info  =   hms_files_info;
+  hms_ops.to_insert_breakpoint =   hms_insert_breakpoint;
+  hms_ops.to_remove_breakpoint =   hms_remove_breakpoint;
+  hms_ops.to_terminal_init  =   0;
+  hms_ops.to_terminal_inferior =   0;
+  hms_ops.to_terminal_ours_for_output =   0;
+  hms_ops.to_terminal_ours  =   0;
+  hms_ops.to_terminal_info  =   0;
+  hms_ops.to_kill  =   hms_kill;       
+  hms_ops.to_load  =   generic_load;
+  hms_ops.to_lookup_symbol =   0;
+  hms_ops.to_create_inferior =   hms_create_inferior;
+  hms_ops.to_mourn_inferior =   hms_mourn;
+  hms_ops.to_can_run  =   0;
+  hms_ops.to_notice_signals =   0;
+  hms_ops.to_thread_alive  =   0;
+  hms_ops.to_stop  =   0;                      
+  hms_ops.to_stratum =   process_stratum;
+  hms_ops.DONT_USE =   0;      
+  hms_ops.to_has_all_memory =   1;
+  hms_ops.to_has_memory =   1;
+  hms_ops.to_has_stack =   1;
+  hms_ops.to_has_registers =   1;
+  hms_ops.to_has_execution =   1;
+  hms_ops.to_sections =   0;
+  hms_ops.to_sections_end =   0;                       
+  hms_ops.to_magic =   OPS_MAGIC;              
 };
 
 hms_quiet ()                   /* FIXME - this routine can be removed after Dec '94 */
@@ -1435,6 +1452,7 @@ remove_commands ()
 void
 _initialize_remote_hms ()
 {
+  init_hms_ops() ;
   add_target (&hms_ops);
 
   add_com ("hms <command>", class_obscure, hms_com,
index 101d964..7e2b19b 100644 (file)
@@ -1585,36 +1585,58 @@ CORE_ADDR       *addr;
 
 /****************************************************************************/
 /* 
- *  Define the target subroutine names 
+ *  Define the target subroutine names
  */
-struct target_ops mm_ops = {
-        "minimon", "Remote AMD/Minimon target",
-       "Remote debug an AMD 290*0 using the MiniMon dbg core on the target",
-        mm_open, mm_close,
-        mm_attach, mm_detach, mm_resume, mm_wait,
-        mm_fetch_registers, mm_store_registers,
-        mm_prepare_to_store,
-        mm_xfer_inferior_memory,
-        mm_files_info,
-        mm_insert_breakpoint, mm_remove_breakpoint, /* Breakpoints */
-        0, 0, 0, 0, 0,          /* Terminal handling */
-        mm_kill,               /* FIXME, kill */
-        mm_load, 
-        0,                      /* lookup_symbol */
-        mm_create_inferior,  /* create_inferior */
-        mm_mourn,            /* mourn_inferior FIXME */
-       0,                      /* can_run */
-       0, /* notice_signals */
-       0,                      /* to_stop */
-        process_stratum, 0, /* next */
-        1, 1, 1, 1, 1,  /* all mem, mem, stack, regs, exec */
-       0,0,            /* sections, sections_end */
-        OPS_MAGIC,              /* Always the last thing */
+struct target_ops mm_ops ;
+
+static void init_mm_ops(void)
+{
+  mm_ops.to_shortname =   "minimon";
+  mm_ops.to_longname =   "Remote AMD/Minimon target";
+  mm_ops.to_doc =   "Remote debug an AMD 290*0 using the MiniMon dbg core on the target";
+  mm_ops.to_open =   mm_open;
+  mm_ops.to_close =   mm_close;
+  mm_ops.to_attach =   mm_attach;
+  mm_ops.to_detach =   mm_detach;
+  mm_ops.to_resume =   mm_resume;
+  mm_ops.to_wait  =   mm_wait;
+  mm_ops.to_fetch_registers  =   mm_fetch_registers;
+  mm_ops.to_store_registers  =   mm_store_registers;
+  mm_ops.to_prepare_to_store =   mm_prepare_to_store;
+  mm_ops.to_xfer_memory  =   mm_xfer_inferior_memory;
+  mm_ops.to_files_info  =   mm_files_info;
+  mm_ops.to_insert_breakpoint =   mm_insert_breakpoint;
+  mm_ops.to_remove_breakpoint =   mm_remove_breakpoint;
+  mm_ops.to_terminal_init  =   0;
+  mm_ops.to_terminal_inferior =   0;
+  mm_ops.to_terminal_ours_for_output =   0;
+  mm_ops.to_terminal_ours  =   0;
+  mm_ops.to_terminal_info  =   0;        
+  mm_ops.to_kill  =   mm_kill;           
+  mm_ops.to_load  =   mm_load;
+  mm_ops.to_lookup_symbol =   0;           
+  mm_ops.to_create_inferior =   mm_create_inferior; 
+  mm_ops.to_mourn_inferior =   mm_mourn; 
+  mm_ops.to_can_run  =   0;    
+  mm_ops.to_notice_signals =   0;
+  mm_ops.to_thread_alive  =   0;
+  mm_ops.to_stop  =   0;               
+  mm_ops.to_stratum =   process_stratum;
+  mm_ops.DONT_USE =   0; 
+  mm_ops.to_has_all_memory =   1;
+  mm_ops.to_has_memory =   1;
+  mm_ops.to_has_stack =   1;
+  mm_ops.to_has_registers =   1;
+  mm_ops.to_has_execution =   1; 
+  mm_ops.to_sections =   0;
+  mm_ops.to_sections_end =   0;        
+  mm_ops.to_magic =   OPS_MAGIC;    
 };
 
 void
 _initialize_remote_mm()
 {
+  init_mm_ops() ;
   add_target (&mm_ops);
 }
 
index 416adc1..1b73de2 100644 (file)
@@ -766,42 +766,59 @@ nindy_before_main_loop ()
 \f
 /* Define the target subroutine names */
 
-struct target_ops nindy_ops = {
-       "nindy", "Remote serial target in i960 NINDY-specific protocol",
-       "Use a remote i960 system running NINDY connected by a serial line.\n\
+struct target_ops nindy_ops ;
+static void init_nindy_ops(void)
+{
+  nindy_ops.to_shortname =   "nindy"; "Remote serial target in i960 NINDY-specific protocol",
+                                       nindy_ops.to_longname =   "Use a remote i960 system running NINDY connected by a serial line.\n\
 Specify the name of the device the serial line is connected to.\n\
 The speed (baud rate), whether to use the old NINDY protocol,\n\
 and whether to send a break on startup, are controlled by options\n\
-specified when you started GDB.",
-       nindy_open, nindy_close,
-       0,
-       nindy_detach,
-       nindy_resume,
-       nindy_wait,
-       nindy_fetch_registers, nindy_store_registers,
-       nindy_prepare_to_store,
-       nindy_xfer_inferior_memory, nindy_files_info,
-       memory_insert_breakpoint,
-       memory_remove_breakpoint,
-       0, 0, 0, 0, 0,  /* Terminal crud */
-       nindy_kill,
-       nindy_load,
-       0, /* lookup_symbol */
-       nindy_create_inferior,
-       nindy_mourn_inferior,
-       0,              /* can_run */
-       0, /* notice_signals */
-       0,                      /* to_thread_alive */
-       0,                      /* to_stop */
-       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 */
-};
+specified when you started GDB." ;
+  nindy_ops.to_doc =   "";
+  nindy_ops.to_open =   nindy_open;
+  nindy_ops.to_close =   nindy_close;
+  nindy_ops.to_attach =   0;
+  nindy_ops.to_detach =   nindy_detach;
+  nindy_ops.to_resume =   nindy_resume;
+  nindy_ops.to_wait  =   nindy_wait;
+  nindy_ops.to_fetch_registers  =   nindy_fetch_registers;
+  nindy_ops.to_store_registers  =   nindy_store_registers;
+  nindy_ops.to_prepare_to_store =   nindy_prepare_to_store;
+  nindy_ops.to_xfer_memory  =   nindy_xfer_inferior_memory;
+  nindy_ops.to_files_info  =   nindy_files_info;
+  nindy_ops.to_insert_breakpoint =   memory_insert_breakpoint;
+  nindy_ops.to_remove_breakpoint =   memory_remove_breakpoint;
+  nindy_ops.to_terminal_init  =   0;
+  nindy_ops.to_terminal_inferior =   0;
+  nindy_ops.to_terminal_ours_for_output =   0;
+  nindy_ops.to_terminal_ours  =   0;
+  nindy_ops.to_terminal_info  =   0;   /* Terminal crud */
+  nindy_ops.to_kill  =   nindy_kill;
+  nindy_ops.to_load  =   nindy_load;
+  nindy_ops.to_lookup_symbol =   0; /* lookup_symbol */
+  nindy_ops.to_create_inferior =   nindy_create_inferior;
+  nindy_ops.to_mourn_inferior =   nindy_mourn_inferior;
+  nindy_ops.to_can_run  =   0;         /* can_run */
+  nindy_ops.to_notice_signals =   0; /* notice_signals */
+  nindy_ops.to_thread_alive  =   0;                    /* to_thread_alive */
+  nindy_ops.to_stop  =   0;                    /* to_stop */
+  nindy_ops.to_stratum =   process_stratum;
+  nindy_ops.DONT_USE =   0; /* next */
+  nindy_ops.to_has_all_memory =   1;
+  nindy_ops.to_has_memory =   1;
+  nindy_ops.to_has_stack =   1;
+  nindy_ops.to_has_registers =   1;
+  nindy_ops.to_has_execution =   1;    /* all mem, mem, stack, regs, exec */
+  nindy_ops.to_sections =   0;
+  nindy_ops.to_sections_end =   0;                     /* Section pointers */
+  nindy_ops.to_magic =   OPS_MAGIC;            /* Always the last thing */
+}
 
 void
 _initialize_nindy ()
 {
+  init_nindy_ops() ;
   add_target (&nindy_ops);
   add_com ("reset", class_obscure, reset_command,
           "Send a 'break' to the remote target system.\n\
index f195aaf..4f99bc6 100644 (file)
@@ -1123,6 +1123,7 @@ connect_command (args, fromtty)
  * through to a printf style function, we need can include formatting
  * strings. We also need a CR or LF on the end.
  */
+#warning FIXME: monitor interface pattern strings, stale struct decl
 struct monitor_ops rombug_cmds = {
   "g \r",                              /* execute or usually GO command */
   "g \r",                              /* continue command */
@@ -1141,52 +1142,57 @@ struct monitor_ops rombug_cmds = {
   ".\r"                                        /* optional command terminator */
 };
 
-struct target_ops rombug_ops = {
-  "rombug",
-  "Microware's ROMBUG debug monitor",
-  "Use a remote computer running the ROMBUG debug monitor.\n\
+struct target_ops rombug_ops ;
+
+static void init_rombug_ops(void)
+{
+  rombug_ops.to_shortname =   "rombug";
+  rombug_ops.to_longname =   "Microware's ROMBUG debug monitor";
+  rombug_ops.to_doc =   "Use a remote computer running the ROMBUG debug monitor.\n\
 Specify the serial device it is connected to (e.g. /dev/ttya).",
-  rombug_open,
-  rombug_close, 
-  0,
-  rombug_detach,
-  rombug_resume,
-  rombug_wait,
-  rombug_fetch_register,
-  rombug_store_register,
-  rombug_prepare_to_store,
-  rombug_xfer_inferior_memory,
-  rombug_files_info,
-  rombug_insert_breakpoint,
-  rombug_remove_breakpoint,    /* Breakpoints */
-  0,
-  0,
-  0,
-  0,
-  0,                           /* Terminal handling */
-  rombug_kill,
-  rombug_load,                 /* load */
-  rombug_link,                         /* lookup_symbol */
-  rombug_create_inferior,
-  rombug_mourn_inferior,
-  0,                           /* can_run */
-  0,                           /* notice_signals */
-  0,                           /* to_stop */
-  process_stratum,
-  0,                           /* next */
-  1,
-  1,
-  1,
-  1,
-  1,                           /* has execution */
-  0,
-  0,                           /* Section pointers */
-  OPS_MAGIC,                   /* Always the last thing */
-};
+    rombug_ops.to_open =   rombug_open;
+  rombug_ops.to_close =   rombug_close;
+  rombug_ops.to_attach =   0;
+  rombug_ops.to_detach =   rombug_detach;
+  rombug_ops.to_resume =   rombug_resume;
+  rombug_ops.to_wait  =   rombug_wait;
+  rombug_ops.to_fetch_registers  =   rombug_fetch_register;
+  rombug_ops.to_store_registers  =   rombug_store_register;
+  rombug_ops.to_prepare_to_store =   rombug_prepare_to_store;
+  rombug_ops.to_xfer_memory  =   rombug_xfer_inferior_memory;
+  rombug_ops.to_files_info  =   rombug_files_info;
+  rombug_ops.to_insert_breakpoint =   rombug_insert_breakpoint;
+  rombug_ops.to_remove_breakpoint =   rombug_remove_breakpoint;        /* Breakpoints */
+  rombug_ops.to_terminal_init  =   0;
+  rombug_ops.to_terminal_inferior =   0;
+  rombug_ops.to_terminal_ours_for_output =   0;
+  rombug_ops.to_terminal_ours  =   0;
+  rombug_ops.to_terminal_info  =   0;                          /* Terminal handling */
+  rombug_ops.to_kill  =   rombug_kill;
+  rombug_ops.to_load  =   rombug_load;                 /* load */
+  rombug_ops.to_lookup_symbol =   rombug_link;                         /* lookup_symbol */
+  rombug_ops.to_create_inferior =   rombug_create_inferior;
+  rombug_ops.to_mourn_inferior =   rombug_mourn_inferior;
+  rombug_ops.to_can_run  =   0;                                /* can_run */
+  rombug_ops.to_notice_signals =   0;                          /* notice_signals */
+  rombug_ops.to_thread_alive  =   0;
+  rombug_ops.to_stop  =   0;                           /* to_stop */
+  rombug_ops.to_stratum =   process_stratum;
+  rombug_ops.DONT_USE =   0;                           /* next */
+  rombug_ops.to_has_all_memory =   1;
+  rombug_ops.to_has_memory =   1;
+  rombug_ops.to_has_stack =   1;
+  rombug_ops.to_has_registers =   1;
+  rombug_ops.to_has_execution =   1;                           /* has execution */
+  rombug_ops.to_sections =   0;
+  rombug_ops.to_sections_end =   0;                            /* Section pointers */
+  rombug_ops.to_magic =   OPS_MAGIC;                   /* Always the last thing */
+} 
 
 void
 _initialize_remote_os9k ()
 {
+  init_rombug_ops() ;
   add_target (&rombug_ops);
 
   add_show_from_set (
index 6db42c1..0a1b695 100644 (file)
@@ -924,53 +924,57 @@ rdi_error_signal (err)
 \f
 /* Define the target operations structure.  */
 
-struct target_ops arm_rdi_ops = {
-  "rdi",                       /* to_shortname */
-  "ARM RDI",                   /* to_longname */
-  "Use a remote ARM-based computer, via the RDI library.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
-  arm_rdi_open,                        /* to_open */
-  arm_rdi_close,               /* to_close */
-  NULL,                                /* to_attach */
-  arm_rdi_detach,              /* to_detach */
-  arm_rdi_resume,              /* to_resume */
-  arm_rdi_wait,                        /* to_wait */
-  arm_rdi_fetch_registers,     /* to_fetch_registers */
-  arm_rdi_store_registers,     /* to_store_registers */
-  arm_rdi_prepare_to_store,    /* to_prepare_to_store */
-  arm_rdi_xfer_memory,         /* to_xfer_memory */
-  arm_rdi_files_info,          /* to_files_info */
-  arm_rdi_insert_breakpoint,   /* to_insert_breakpoint */
-  arm_rdi_remove_breakpoint,   /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  arm_rdi_kill,                        /* to_kill */
-  generic_load,                        /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  arm_rdi_create_inferior,     /* to_create_inferior */
-  arm_rdi_mourn_inferior,      /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+struct target_ops arm_rdi_ops ;
+
+static void init_rdi_ops(void)
+{
+  arm_rdi_ops.to_shortname =   "rdi";  
+  arm_rdi_ops.to_longname =   "ARM RDI";
+  arm_rdi_ops.to_doc =   "Use a remote ARM-based computer; via the RDI library.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya)." ; 
+  arm_rdi_ops.to_open =   arm_rdi_open;                
+  arm_rdi_ops.to_close =   arm_rdi_close;      
+  arm_rdi_ops.to_attach =   NULL;              
+  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_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;
+  arm_rdi_ops.to_xfer_memory  =   arm_rdi_xfer_memory;
+  arm_rdi_ops.to_files_info  =   arm_rdi_files_info;
+  arm_rdi_ops.to_insert_breakpoint =   arm_rdi_insert_breakpoint;
+  arm_rdi_ops.to_remove_breakpoint =   arm_rdi_remove_breakpoint;      
+  arm_rdi_ops.to_terminal_init  =   NULL;              
+  arm_rdi_ops.to_terminal_inferior =   NULL;           
+  arm_rdi_ops.to_terminal_ours_for_output =   NULL;    
+  arm_rdi_ops.to_terminal_ours  =   NULL;              
+  arm_rdi_ops.to_terminal_info  =   NULL;              
+  arm_rdi_ops.to_kill  =   arm_rdi_kill;               
+  arm_rdi_ops.to_load  =   generic_load;               
+  arm_rdi_ops.to_lookup_symbol =   NULL;                       
+  arm_rdi_ops.to_create_inferior =   arm_rdi_create_inferior;
+  arm_rdi_ops.to_mourn_inferior =   arm_rdi_mourn_inferior;
+  arm_rdi_ops.to_can_run  =   0;               
+  arm_rdi_ops.to_notice_signals =   0;         
+  arm_rdi_ops.to_thread_alive  =   0;          
+  arm_rdi_ops.to_stop  =   0;                  
+  arm_rdi_ops.to_stratum =   process_stratum;
+  arm_rdi_ops.DONT_USE =   NULL;       
+  arm_rdi_ops.to_has_all_memory =   1; 
+  arm_rdi_ops.to_has_memory =   1;     
+  arm_rdi_ops.to_has_stack =   1;      
+  arm_rdi_ops.to_has_registers =   1;  
+  arm_rdi_ops.to_has_execution =   1;  
+  arm_rdi_ops.to_sections =   NULL;    
+  arm_rdi_ops.to_sections_end =   NULL;        
+  arm_rdi_ops.to_magic =   OPS_MAGIC ; 
+}
 
 void
 _initialize_remote_rdi ()
 {
+  init_rdi_ops() ;
   add_target (&arm_rdi_ops);
 }
 
index 04a9473..939df60 100644 (file)
@@ -1395,54 +1395,55 @@ remote_rdp_attach(args, from_tty)
   
 /* Define the target subroutine names */
 
-struct target_ops remote_rdp_ops =
+struct target_ops remote_rdp_ops ;
+
+static void init_remote_rdp_ops(void)
 {
-  "rdp",                       /* to_shortname */
-  /* to_longname */
-  "Remote Target using the RDProtocol",
-  /* to_doc */
-  "Use a remote ARM system which uses the ARM Remote Debugging Protocol",
-  remote_rdp_open,             /* to_open */
-  remote_rdp_close,            /* to_close */
-  remote_rdp_attach,           /* to_attach */
-  NULL,                                /* to_detach */
-  remote_rdp_resume,           /* to_resume */
-  remote_rdp_wait,             /* to_wait */
-  remote_rdp_fetch_register,   /* to_fetch_registers */
-  remote_rdp_store_register,   /* to_store_registers */
-  remote_rdp_prepare_to_store, /* to_prepare_to_store */
-  remote_rdp_xfer_inferior_memory,     /* to_xfer_memory */
-  remote_rdp_files_info,       /* to_files_info */
-  remote_rdp_insert_breakpoint,        /* to_insert_breakpoint */
-  remote_rdp_remove_breakpoint,        /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  remote_rdp_kill,             /* to_kill */
-  generic_load,                        /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  remote_rdp_create_inferior,  /* to_create_inferior */
-  generic_mourn_inferior,      /* to_mourn_inferior */
-  remote_rdp_can_run,          /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC,                   /* to_magic */
-};
+  remote_rdp_ops.to_shortname =   "rdp";
+  remote_rdp_ops.to_longname =   "Remote Target using the RDProtocol";
+  remote_rdp_ops.to_doc =   "Use a remote ARM system which uses the ARM Remote Debugging Protocol";
+  remote_rdp_ops.to_open =   remote_rdp_open;  
+  remote_rdp_ops.to_close =   remote_rdp_close;        
+  remote_rdp_ops.to_attach =   remote_rdp_attach;
+  remote_rdp_ops.to_detach =   NULL;           
+  remote_rdp_ops.to_resume =   remote_rdp_resume;
+  remote_rdp_ops.to_wait  =   remote_rdp_wait; 
+  remote_rdp_ops.to_fetch_registers  =   remote_rdp_fetch_register;
+  remote_rdp_ops.to_store_registers  =   remote_rdp_store_register;
+  remote_rdp_ops.to_prepare_to_store =   remote_rdp_prepare_to_store;
+  remote_rdp_ops.to_xfer_memory  =   remote_rdp_xfer_inferior_memory;
+  remote_rdp_ops.to_files_info  =   remote_rdp_files_info;
+  remote_rdp_ops.to_insert_breakpoint =   remote_rdp_insert_breakpoint;
+  remote_rdp_ops.to_remove_breakpoint =   remote_rdp_remove_breakpoint;
+  remote_rdp_ops.to_terminal_init  =   NULL;           
+  remote_rdp_ops.to_terminal_inferior =   NULL;                
+  remote_rdp_ops.to_terminal_ours_for_output =   NULL;
+  remote_rdp_ops.to_terminal_ours  =   NULL;   
+  remote_rdp_ops.to_terminal_info  =   NULL;   
+  remote_rdp_ops.to_kill  =   remote_rdp_kill; 
+  remote_rdp_ops.to_load  =   generic_load;    
+  remote_rdp_ops.to_lookup_symbol =   NULL;                            
+  remote_rdp_ops.to_create_inferior =   remote_rdp_create_inferior;
+  remote_rdp_ops.to_mourn_inferior =   generic_mourn_inferior;
+  remote_rdp_ops.to_can_run  =   remote_rdp_can_run;
+  remote_rdp_ops.to_notice_signals =   0;      
+  remote_rdp_ops.to_thread_alive  =   0;       
+  remote_rdp_ops.to_stop  =   0;               
+  remote_rdp_ops.to_stratum =   process_stratum;
+  remote_rdp_ops.DONT_USE =   NULL;            
+  remote_rdp_ops.to_has_all_memory =   1;      
+  remote_rdp_ops.to_has_memory =   1;          
+  remote_rdp_ops.to_has_stack =   1;           
+  remote_rdp_ops.to_has_registers =   1;       
+  remote_rdp_ops.to_has_execution =   1;       
+  remote_rdp_ops.to_sections =   NULL;         
+  remote_rdp_ops.to_sections_end =   NULL;
+  remote_rdp_ops.to_magic =   OPS_MAGIC;
+}
 
 void
 _initialize_remote_rdp ()
 {
+  init_remote_rdp_ops() ;
   add_target (&remote_rdp_ops);
 }
index ef5efb8..5b16c82 100644 (file)
@@ -1121,50 +1121,51 @@ sds_remove_breakpoint (addr, contents_cache)
 \f
 /* Define the target operations vector. */
 
-static struct target_ops sds_ops =
+static struct target_ops sds_ops ;
+
+static void init_sds_ops(void)
 {
-  "sds",                       /* to_shortname */
-  "Remote serial target with SDS protocol",    /* to_longname */
-  "Use a remote computer via a serial line, using the SDS protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
-  sds_open,                    /* to_open */
-  sds_close,                   /* to_close */
-  NULL,                                /* to_attach */
-  sds_detach,                  /* to_detach */
-  sds_resume,                  /* to_resume */
-  sds_wait,                    /* to_wait */
-  sds_fetch_registers,         /* to_fetch_registers */
-  sds_store_registers,         /* to_store_registers */
-  sds_prepare_to_store,                /* to_prepare_to_store */
-  sds_xfer_memory,             /* to_xfer_memory */
-  sds_files_info,              /* to_files_info */
-  sds_insert_breakpoint,       /* to_insert_breakpoint */
-  sds_remove_breakpoint,       /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  sds_kill,                    /* to_kill */
-  sds_load,                    /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  sds_create_inferior,         /* to_create_inferior */
-  sds_mourn,                   /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+  sds_ops.to_shortname =   "sds";
+  sds_ops.to_longname =   "Remote serial target with SDS protocol";
+  sds_ops.to_doc =   "Use a remote computer via a serial line; using the SDS protocol.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).", 
+    sds_ops.to_open =   sds_open;      
+  sds_ops.to_close =   sds_close;      
+  sds_ops.to_attach =   NULL;          
+  sds_ops.to_detach =   sds_detach;    
+  sds_ops.to_resume =   sds_resume;    
+  sds_ops.to_wait  =   sds_wait;       
+  sds_ops.to_fetch_registers  =   sds_fetch_registers;
+  sds_ops.to_store_registers  =   sds_store_registers; 
+  sds_ops.to_prepare_to_store =   sds_prepare_to_store;        
+  sds_ops.to_xfer_memory  =   sds_xfer_memory; 
+  sds_ops.to_files_info  =   sds_files_info;   
+  sds_ops.to_insert_breakpoint =   sds_insert_breakpoint;
+  sds_ops.to_remove_breakpoint =   sds_remove_breakpoint;
+  sds_ops.to_terminal_init  =   NULL;          
+  sds_ops.to_terminal_inferior =   NULL;       
+  sds_ops.to_terminal_ours_for_output =   NULL;        
+  sds_ops.to_terminal_ours  =   NULL;  
+  sds_ops.to_terminal_info  =   NULL;  
+  sds_ops.to_kill  =   sds_kill;       
+  sds_ops.to_load  =   sds_load;       
+  sds_ops.to_lookup_symbol =   NULL;                   
+  sds_ops.to_create_inferior =   sds_create_inferior;
+  sds_ops.to_mourn_inferior =   sds_mourn;
+  sds_ops.to_can_run  =   0;           
+  sds_ops.to_notice_signals =   0;     
+  sds_ops.to_thread_alive  =   0;      
+  sds_ops.to_stop  =   0;              
+  sds_ops.to_stratum =   process_stratum;
+  sds_ops.DONT_USE =   NULL;           
+  sds_ops.to_has_all_memory =   1;
+  sds_ops.to_has_memory =   1; 
+  sds_ops.to_has_stack =   1;                          /* to_has_stack */
+  sds_ops.to_has_registers =   1;  sds_ops.to_has_execution =   1;
+  sds_ops.to_sections =   NULL;        
+  sds_ops.to_sections_end =   NULL;
+  sds_ops.to_magic =   OPS_MAGIC ;
+}
 
 /* Put a command string, in args, out to the monitor and display the
    reply message.  */
@@ -1202,6 +1203,7 @@ sds_command (args, from_tty)
 void
 _initialize_remote_sds ()
 {
+  init_sds_ops() ;
   add_target (&sds_ops);
 
   add_show_from_set (add_set_cmd ("sdstimeout", no_class,
index 4ec4cd3..853fd40 100644 (file)
@@ -915,52 +915,55 @@ simulator_command (args, from_tty)
 
 /* Define the target subroutine names */
 
-struct target_ops gdbsim_ops = {
-  "sim",                       /* to_shortname */
-  "simulator",                 /* to_longname */
-  "Use the compiled-in simulator.",  /* to_doc */
-  gdbsim_open,                 /* to_open */
-  gdbsim_close,                        /* to_close */
-  NULL,                                /* to_attach */
-  gdbsim_detach,               /* to_detach */
-  gdbsim_resume,               /* to_resume */
-  gdbsim_wait,                 /* to_wait */
-  gdbsim_fetch_register,       /* to_fetch_registers */
-  gdbsim_store_register,       /* to_store_registers */
-  gdbsim_prepare_to_store,     /* to_prepare_to_store */
-  gdbsim_xfer_inferior_memory, /* to_xfer_memory */
-  gdbsim_files_info,           /* to_files_info */
-  gdbsim_insert_breakpoint,    /* to_insert_breakpoint */
-  gdbsim_remove_breakpoint,    /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  gdbsim_kill,                 /* to_kill */
-  gdbsim_load,                 /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  gdbsim_create_inferior,      /* to_create_inferior */ 
-  gdbsim_mourn_inferior,       /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  gdbsim_stop,                 /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC,                   /* to_magic */
-};
+struct target_ops gdbsim_ops ;
+static void init_gdbsim_ops(void)
+{
+  gdbsim_ops.to_shortname =   "sim";           
+  gdbsim_ops.to_longname =   "simulator";              
+  gdbsim_ops.to_doc =   "Use the compiled-in simulator.";  
+  gdbsim_ops.to_open =   gdbsim_open;          
+  gdbsim_ops.to_close =   gdbsim_close;                
+  gdbsim_ops.to_attach =   NULL;               
+  gdbsim_ops.to_detach =   gdbsim_detach;      
+  gdbsim_ops.to_resume =   gdbsim_resume;      
+  gdbsim_ops.to_wait  =   gdbsim_wait;         
+  gdbsim_ops.to_fetch_registers  =   gdbsim_fetch_register;
+  gdbsim_ops.to_store_registers  =   gdbsim_store_register;
+  gdbsim_ops.to_prepare_to_store =   gdbsim_prepare_to_store;
+  gdbsim_ops.to_xfer_memory  =   gdbsim_xfer_inferior_memory;
+  gdbsim_ops.to_files_info  =   gdbsim_files_info;     
+  gdbsim_ops.to_insert_breakpoint =   gdbsim_insert_breakpoint;
+  gdbsim_ops.to_remove_breakpoint =   gdbsim_remove_breakpoint;
+  gdbsim_ops.to_terminal_init  =   NULL;               
+  gdbsim_ops.to_terminal_inferior =   NULL;            
+  gdbsim_ops.to_terminal_ours_for_output =   NULL;
+  gdbsim_ops.to_terminal_ours  =   NULL;
+  gdbsim_ops.to_terminal_info  =   NULL;
+  gdbsim_ops.to_kill  =   gdbsim_kill; 
+  gdbsim_ops.to_load  =   gdbsim_load; 
+  gdbsim_ops.to_lookup_symbol =   NULL;        
+  gdbsim_ops.to_create_inferior =   gdbsim_create_inferior;
+  gdbsim_ops.to_mourn_inferior =   gdbsim_mourn_inferior;
+  gdbsim_ops.to_can_run  =   0;                        
+  gdbsim_ops.to_notice_signals =   0;          
+  gdbsim_ops.to_thread_alive  =   0;           
+  gdbsim_ops.to_stop  =   gdbsim_stop;         
+  gdbsim_ops.to_stratum =   process_stratum;   
+  gdbsim_ops.DONT_USE =   NULL;                
+  gdbsim_ops.to_has_all_memory =   1;  
+  gdbsim_ops.to_has_memory =   1;      
+  gdbsim_ops.to_has_stack =   1;       
+  gdbsim_ops.to_has_registers =   1;   
+  gdbsim_ops.to_has_execution =   1;   
+  gdbsim_ops.to_sections =   NULL;     
+  gdbsim_ops.to_sections_end =   NULL; 
+  gdbsim_ops.to_magic =   OPS_MAGIC;   
+}
 
 void
 _initialize_remote_sim ()
 {
+  init_gdbsim_ops() ;
   add_target (&gdbsim_ops);
 
   add_com ("sim <command>", class_obscure, simulator_command,
index 117501d..bba7961 100644 (file)
@@ -790,54 +790,59 @@ connect_command (args, fromtty)
 
 /* Define the target subroutine names */
 
-struct target_ops st2000_ops = {
-  "st2000",
-  "Remote serial Tandem ST2000 target",
-  "Use a remote computer running STDEBUG connected by a serial line,\n\
+struct target_ops st2000_ops ;
+
+static void init_st2000_ops(void)
+{
+  st2000_ops.to_shortname =   "st2000";
+  st2000_ops.to_longname =   "Remote serial Tandem ST2000 target";
+  st2000_ops.to_doc =   "Use a remote computer running STDEBUG connected by a serial line;\n\
 or a network connection.\n\
 Arguments are the name of the device for the serial line,\n\
-the speed to connect at in bits per second.",
-  st2000_open,
-  st2000_close, 
-  0,
-  st2000_detach,
-  st2000_resume,
-  st2000_wait,
-  st2000_fetch_register,
-  st2000_store_register,
-  st2000_prepare_to_store,
-  st2000_xfer_inferior_memory,
-  st2000_files_info,
-  st2000_insert_breakpoint,
-  st2000_remove_breakpoint,    /* Breakpoints */
-  0,
-  0,
-  0,
-  0,
-  0,                           /* Terminal handling */
-  st2000_kill,
-  0,                           /* load */
-  0,                           /* lookup_symbol */
-  st2000_create_inferior,
-  st2000_mourn_inferior,
-  0,                           /* can_run */
-  0,                           /* notice_signals */
-  0,                           /* to_stop */
-  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 */
-};
+the speed to connect at in bits per second." ;
+  st2000_ops.to_open =   st2000_open;
+  st2000_ops.to_close =   st2000_close;
+  st2000_ops.to_attach =   0;
+  st2000_ops.to_detach =   st2000_detach;
+  st2000_ops.to_resume =   st2000_resume;
+  st2000_ops.to_wait  =   st2000_wait;
+  st2000_ops.to_fetch_registers  =   st2000_fetch_register;
+  st2000_ops.to_store_registers  =   st2000_store_register;
+  st2000_ops.to_prepare_to_store =   st2000_prepare_to_store;
+  st2000_ops.to_xfer_memory  =   st2000_xfer_inferior_memory;
+  st2000_ops.to_files_info  =   st2000_files_info;
+  st2000_ops.to_insert_breakpoint =   st2000_insert_breakpoint;
+  st2000_ops.to_remove_breakpoint =   st2000_remove_breakpoint;        /* Breakpoints */
+  st2000_ops.to_terminal_init  =   0;
+  st2000_ops.to_terminal_inferior =   0;
+  st2000_ops.to_terminal_ours_for_output =   0;
+  st2000_ops.to_terminal_ours  =   0;
+  st2000_ops.to_terminal_info  =   0;                          /* Terminal handling */
+  st2000_ops.to_kill  =   st2000_kill;
+  st2000_ops.to_load  =   0;                           /* load */
+  st2000_ops.to_lookup_symbol =   0;                           /* lookup_symbol */
+  st2000_ops.to_create_inferior =   st2000_create_inferior;
+  st2000_ops.to_mourn_inferior =   st2000_mourn_inferior;
+  st2000_ops.to_can_run  =   0;                                /* can_run */
+  st2000_ops.to_notice_signals =   0;                          /* notice_signals */
+  st2000_ops.to_thread_alive  =   0;                            /* thread alive */
+  st2000_ops.to_stop  =   0;                           /* to_stop */
+  st2000_ops.to_stratum =   process_stratum;
+  st2000_ops.DONT_USE =   0;                           /* next */
+  st2000_ops.to_has_all_memory =   1;
+  st2000_ops.to_has_memory =   1;
+  st2000_ops.to_has_stack =   1;
+  st2000_ops.to_has_registers =   1;
+  st2000_ops.to_has_execution =   1;                           /* all mem, mem, stack, regs, exec */
+  st2000_ops.to_sections =   0;
+  st2000_ops.to_sections_end =   0;                            /* Section pointers */
+  st2000_ops.to_magic =   OPS_MAGIC;                   /* Always the last thing */
+} ;
 
 void
 _initialize_remote_st2000 ()
 {
+  init_st2000_ops() ;
   add_target (&st2000_ops);
   add_com ("st2000 <command>", class_obscure, st2000_command,
           "Send a command to the STDBUG monitor.");
index 9512023..dfc9f6b 100644 (file)
@@ -1621,18 +1621,21 @@ service_HIF(msg)
    The RS/6000 doesn't like "extern" followed by "static"; SunOS
    /bin/cc doesn't like "static" twice.  */
 
-struct target_ops udi_ops = {
-        "udi",
-       "Remote UDI connected TIP",
-       "Remote debug an AMD 29k using UDI socket connection to TIP process.\n\
+struct target_ops udi_ops ;
+
+static void init_udi_ops(void)
+{
+  udi_ops.to_shortname =         "udi";
+  udi_ops.to_longname =        "Remote UDI connected TIP";
+  udi_ops.to_doc =     "Remote debug an AMD 29k using UDI socket connection to TIP process.\n\
 Arguments are\n\
 `configuration-id AF_INET hostname port-number'\n\
-    To connect via the network, where hostname and port-number specify the\n\
-    host and port where you can connect via UDI.\n\
-    configuration-id is unused.\n\
+To connect via the network, where hostname and port-number specify the\n\
+host and port where you can connect via UDI.\n\
+configuration-id is unused.\n\
 \n\
 `configuration-id AF_UNIX socket-name tip-program'\n\
-    To connect using a local connection to the \"tip.exe\" program which is\n\
+To connect using a local connection to the \"tip.exe\" program which is\n\
     supplied by AMD.  If socket-name specifies an AF_UNIX socket then the\n\
     tip program must already be started; connect to it using that socket.\n\
     If not, start up tip-program, which should be the name of the tip\n\
@@ -1642,48 +1645,49 @@ Arguments are\n\
 `configuration-id'\n\
     Look up the configuration in ./udi_soc or /etc/udi_soc, which\n\
     are files containing lines in the above formats.  configuration-id is\n\
-    used to pick which line of the file to use.",
-        udi_open,
-       udi_close,
-        udi_attach,
-       udi_detach,
-       udi_resume,
-       udi_wait,
-        udi_fetch_registers,
-       udi_store_registers,
-        udi_prepare_to_store,
-        udi_xfer_inferior_memory,
-        udi_files_info,
-        udi_insert_breakpoint,
-       udi_remove_breakpoint,
-        0,                     /* termial_init */
-       0,                      /* terminal_inferior */
-       0,                      /* terminal_ours_for_output */
-       0,                      /* terminal_ours */
-       0,                      /* terminal_info */
-        udi_kill,              /* FIXME, kill */
-        udi_load,              /* to_load */
-        0,                      /* lookup_symbol */
-        udi_create_inferior,
-        udi_mourn,             /* mourn_inferior FIXME */
-       0,                      /* can_run */
-       0,                      /* notice_signals */
-       0,                      /* to_thread_alive */
-        0,                     /* to_stop */
-        process_stratum,
-       0,                      /* next */
-        1,                     /* has_all_memory */
-       1,                      /* has_memory */
-       1,                      /* has_stack */
-       1,                      /* has_registers */
-       1,                      /* has_execution */
-       0,                      /* sections */
-       0,                      /* sections_end */
-       OPS_MAGIC,              /* Always the last thing */
+    used to pick which line of the file to use." ;
+  udi_ops.to_open =         udi_open;
+  udi_ops.to_close =   udi_close;
+  udi_ops.to_attach =         udi_attach;
+  udi_ops.to_detach =  udi_detach;
+  udi_ops.to_resume =  udi_resume;
+  udi_ops.to_wait  =   udi_wait;
+  udi_ops.to_fetch_registers  =         udi_fetch_registers;
+  udi_ops.to_store_registers  =        udi_store_registers;
+  udi_ops.to_prepare_to_store =         udi_prepare_to_store;
+  udi_ops.to_xfer_memory  =         udi_xfer_inferior_memory;
+  udi_ops.to_files_info  =         udi_files_info;
+  udi_ops.to_insert_breakpoint =         udi_insert_breakpoint;
+  udi_ops.to_remove_breakpoint =       udi_remove_breakpoint;
+  udi_ops.to_terminal_init  =         0;               
+  udi_ops.to_terminal_inferior =       0;              
+  udi_ops.to_terminal_ours_for_output =        0;
+  udi_ops.to_terminal_ours  =  0;      
+  udi_ops.to_terminal_info  =  0;      
+  udi_ops.to_kill  =         udi_kill;  
+  udi_ops.to_load  =         udi_load; 
+  udi_ops.to_lookup_symbol =         0; 
+  udi_ops.to_create_inferior =         udi_create_inferior;
+  udi_ops.to_mourn_inferior =         udi_mourn;
+  udi_ops.to_can_run  =        0;      
+  udi_ops.to_notice_signals =  0;      
+  udi_ops.to_thread_alive  =   0;      
+  udi_ops.to_stop  =         0;                
+  udi_ops.to_stratum =         process_stratum;
+  udi_ops.DONT_USE =   0;              
+  udi_ops.to_has_all_memory =         1;
+  udi_ops.to_has_memory =      1;      
+  udi_ops.to_has_stack =       1;      
+  udi_ops.to_has_registers =   1;      
+  udi_ops.to_has_execution =   1;      
+  udi_ops.to_sections =        0;      
+  udi_ops.to_sections_end =    0;      
+  udi_ops.to_magic =   OPS_MAGIC;
 };
 
 void
 _initialize_remote_udi ()
 {
+  init_udi_ops() ;
   add_target (&udi_ops);
 }
index 9fe9894..df34263 100644 (file)
@@ -1394,62 +1394,107 @@ vx_proc_open (name, from_tty)
 
 /* Target ops structure for accessing memory and such over the net */
 
-struct target_ops vx_ops = {
-  "vxworks", "VxWorks target memory via RPC over TCP/IP",
-  "Use VxWorks target memory.  \n\
+struct target_ops vx_ops ;
+
+static void init_vx_ops(void)
+{
+  vx_ops.to_shortname =   "vxworks";
+  vx_ops.to_longname =   "VxWorks target memory via RPC over TCP/IP";
+  vx_ops.to_doc =   "Use VxWorks target memory.  \n\
 Specify the name of the machine to connect to.",
-  vx_open, vx_close, vx_attach, 0, /* vx_detach, */
-  0, 0, /* resume, wait */
-  0, 0, /* read_reg, write_reg */
-  0, /* prep_to_store, */
-  vx_xfer_memory, vx_files_info,
-  0, 0, /* insert_breakpoint, remove_breakpoint */
-  0, 0, 0, 0, 0,       /* terminal stuff */
-  0, /* vx_kill, */
-  vx_load_command,
-  vx_lookup_symbol,
-  vx_create_inferior, 0,  /* mourn_inferior */
-  0, /* can_run */
-  0, /* notice_signals */
-  0, /* thread_alive */
-  0,                           /* to_stop */
-  core_stratum, 0, /* next */
-  1, 1, 0, 0, 0,       /* all mem, mem, stack, regs, exec */
-  0, 0,                        /* Section pointers */
-  OPS_MAGIC,           /* Always the last thing */
+    vx_ops.to_open =   vx_open;
+  vx_ops.to_close =   vx_close;
+  vx_ops.to_attach =   vx_attach;
+  vx_ops.to_detach =   0; /* vx_detach, */
+  vx_ops.to_resume =   0;
+  vx_ops.to_wait  =   0; /* resume, wait */
+  vx_ops.to_fetch_registers  =   0;
+  vx_ops.to_store_registers  =   0; /* read_reg, write_reg */
+  vx_ops.to_prepare_to_store =   0; /* prep_to_store, */
+  vx_ops.to_xfer_memory  =   vx_xfer_memory;
+  vx_ops.to_files_info  =   vx_files_info;
+  vx_ops.to_insert_breakpoint =   0;
+  vx_ops.to_remove_breakpoint =   0; /* insert_breakpoint, remove_breakpoint */
+  vx_ops.to_terminal_init  =   0;
+  vx_ops.to_terminal_inferior =   0;
+  vx_ops.to_terminal_ours_for_output =   0;
+  vx_ops.to_terminal_ours  =   0;
+  vx_ops.to_terminal_info  =   0;      /* terminal stuff */
+  vx_ops.to_kill  =   0; /* vx_kill, */
+  vx_ops.to_load  =   vx_load_command;
+  vx_ops.to_lookup_symbol =   vx_lookup_symbol;
+  vx_ops.to_create_inferior =   vx_create_inferior;
+  vx_ops.to_mourn_inferior =   0;  /* mourn_inferior */
+  vx_ops.to_can_run  =   0; /* can_run */
+  vx_ops.to_notice_signals =   0; /* notice_signals */
+  vx_ops.to_thread_alive  =   0; /* thread_alive */
+  vx_ops.to_stop  =   0;                               /* to_stop */
+  vx_ops.to_stratum =   core_stratum;
+  vx_ops.DONT_USE =   0; /* next */
+  vx_ops.to_has_all_memory =   1;
+  vx_ops.to_has_memory =   1;
+  vx_ops.to_has_stack =   0;
+  vx_ops.to_has_registers =   0;
+  vx_ops.to_has_execution =   0;       /* all mem, mem, stack, regs, exec */
+  vx_ops.to_sections =   0;
+  vx_ops.to_sections_end =   0;
+  vx_ops.to_magic =   OPS_MAGIC;               /* Always the last thing */
 };
 
 /* Target ops structure for accessing VxWorks child processes over the net */
 
-struct target_ops vx_run_ops = {
-  "vxprocess", "VxWorks process",
-  "VxWorks process, started by the \"run\" command.",
-  vx_proc_open, vx_proc_close, 0, vx_detach, /* vx_attach */
-  vx_resume, vx_wait,
-  vx_read_register, vx_write_register,
-  vx_prepare_to_store,
-  vx_xfer_memory, vx_run_files_info,
-  vx_insert_breakpoint, vx_remove_breakpoint,
-  0, 0, 0, 0, 0,       /* terminal stuff */
-  vx_kill,
-  vx_load_command,
-  vx_lookup_symbol,
-  0, vx_mourn_inferior,
-  0, /* can_run */
-  0, /* notice_signals */
-  0, /* thread_alive */
-  0,                           /* to_stop */
-  process_stratum, 0, /* next */
-  0, /* all_mem--off to avoid spurious msg in "i files" */
-  1, 1, 1, 1,  /* mem, stack, regs, exec */
-  0, 0,                        /* Section pointers */
-  OPS_MAGIC,           /* Always the last thing */
-};
+struct target_ops vx_run_ops ;
+
+static void init_vx_run_ops(void)
+{
+  vx_run_ops.to_shortname =   "vxprocess";
+  vx_run_ops.to_longname =   "VxWorks process";
+  vx_run_ops.to_doc =   "VxWorks process; started by the \"run\" command.",
+    vx_run_ops.to_open =   vx_proc_open;
+  vx_run_ops.to_close =   vx_proc_close;
+  vx_run_ops.to_attach =   0;
+  vx_run_ops.to_detach =   vx_detach; 
+  vx_run_ops.to_resume =   vx_resume;
+  vx_run_ops.to_wait  =   vx_wait;
+  vx_run_ops.to_fetch_registers  =   vx_read_register;
+  vx_run_ops.to_store_registers  =   vx_write_register;
+  vx_run_ops.to_prepare_to_store =   vx_prepare_to_store;
+  vx_run_ops.to_xfer_memory  =   vx_xfer_memory;
+  vx_run_ops.to_files_info  =   vx_run_files_info;
+  vx_run_ops.to_insert_breakpoint =   vx_insert_breakpoint;
+  vx_run_ops.to_remove_breakpoint =   vx_remove_breakpoint;
+  vx_run_ops.to_terminal_init  =   0;
+  vx_run_ops.to_terminal_inferior =   0;
+  vx_run_ops.to_terminal_ours_for_output =   0;
+  vx_run_ops.to_terminal_ours  =   0;
+  vx_run_ops.to_terminal_info  =   0;
+  vx_run_ops.to_kill  =   vx_kill;
+  vx_run_ops.to_load  =   vx_load_command;
+  vx_run_ops.to_lookup_symbol =   vx_lookup_symbol;
+  vx_run_ops.to_create_inferior =   0;
+  vx_run_ops.to_mourn_inferior =   vx_mourn_inferior ;
+  vx_run_ops.to_can_run =   0; 
+  vx_run_ops.to_notice_signals  =   0; 
+  vx_run_ops.to_thread_alive =   0; 
+  vx_run_ops.to_stop  =   0;   
+  vx_run_ops.to_stratum  =   process_stratum;
+  vx_run_ops.DONT_USE =   0; 
+  vx_run_ops.to_has_all_memory =   0; 
+  vx_run_ops.to_has_memory =   1;
+  vx_run_ops.to_has_stack =   1;
+  vx_run_ops.to_has_registers =   1;
+  vx_run_ops.to_has_execution =   1;   
+  vx_run_ops.to_sections =   0;
+  vx_run_ops.to_sections_end =   0;    
+  vx_run_ops.to_magic =   OPS_MAGIC;   
+}
 /* ==> Remember when reading at end of file, there are two "ops" structs here. */
 \f
 void
 _initialize_vx ()
 {
+  init_vx_ops() ;
+  init_vx_run_ops() ;
   add_show_from_set
     (add_set_cmd ("vxworks-timeout", class_support, var_uinteger,
                  (char *) &rpcTimeout.tv_sec,
index c1d8ec1..8f94e16 100644 (file)
@@ -275,15 +275,108 @@ static int remote_remove_breakpoint PARAMS ((CORE_ADDR, char *));
 
 static int hexnumlen PARAMS ((ULONGEST num));
 
-static struct target_ops remote_ops;   /* Forward decl */
-static struct target_ops extended_remote_ops;  /* Forward decl */
-
 /* exported functions */
 
 extern int fromhex PARAMS ((int a));
 extern void getpkt PARAMS ((char *buf, int forever));
 extern int putpkt PARAMS ((char *buf));
 
+/* Define the target subroutine names */
+
+static struct target_ops remote_ops ;
+
+static void init_remote_ops(void)
+{
+  remote_ops.to_shortname =   "remote";                
+  remote_ops.to_longname =   "Remote serial target in gdb-specific protocol";
+  remote_ops.to_doc =   "Use a remote computer via a serial line; using a gdb-specific protocol.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya)." ;  
+  remote_ops.to_open =   remote_open;          
+  remote_ops.to_close =   remote_close;                
+  remote_ops.to_attach =   NULL;               
+  remote_ops.to_detach =   remote_detach;      
+  remote_ops.to_resume =   remote_resume;      
+  remote_ops.to_wait  =   remote_wait;         
+  remote_ops.to_fetch_registers  =   remote_fetch_registers;
+  remote_ops.to_store_registers  =   remote_store_registers;
+  remote_ops.to_prepare_to_store =   remote_prepare_to_store;
+  remote_ops.to_xfer_memory  =   remote_xfer_memory;   
+  remote_ops.to_files_info  =   remote_files_info;     
+  remote_ops.to_insert_breakpoint =   remote_insert_breakpoint;
+  remote_ops.to_remove_breakpoint =   remote_remove_breakpoint;
+  remote_ops.to_terminal_init  =   NULL;               
+  remote_ops.to_terminal_inferior =   NULL;            
+  remote_ops.to_terminal_ours_for_output =   NULL;
+  remote_ops.to_terminal_ours  =   NULL;       
+  remote_ops.to_terminal_info  =   NULL;       
+  remote_ops.to_kill  =   remote_kill;         
+  remote_ops.to_load  =   generic_load;                
+  remote_ops.to_lookup_symbol =   NULL;                
+  remote_ops.to_create_inferior =   NULL;      
+  remote_ops.to_mourn_inferior =   remote_mourn;
+  remote_ops.to_can_run  =   0;                        
+  remote_ops.to_notice_signals =   0;          
+  remote_ops.to_thread_alive  =   remote_thread_alive;
+  remote_ops.to_stop  =   0;           
+  remote_ops.to_stratum =   process_stratum;
+  remote_ops.DONT_USE =   NULL;                
+  remote_ops.to_has_all_memory =   1;  
+  remote_ops.to_has_memory =   1;      
+  remote_ops.to_has_stack =   1;       
+  remote_ops.to_has_registers =   1;   
+  remote_ops.to_has_execution =   1;   
+  remote_ops.to_sections =   NULL;     
+  remote_ops.to_sections_end =   NULL; 
+  remote_ops.to_magic =   OPS_MAGIC ;  
+} /* init_remote_ops */
+
+static struct target_ops extended_remote_ops ;
+
+static void init_extended_remote_ops(void) 
+{
+  extended_remote_ops.to_shortname =   "extended-remote";      
+  extended_remote_ops.to_longname =   "Extended remote serial target in gdb-specific protocol";
+  extended_remote_ops.to_doc =   "Use a remote computer via a serial line; using a gdb-specific protocol.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).",
+    extended_remote_ops.to_open =   extended_remote_open;      
+  extended_remote_ops.to_close =   remote_close;       
+  extended_remote_ops.to_attach =   NULL;              
+  extended_remote_ops.to_detach =   remote_detach;     
+  extended_remote_ops.to_resume =   remote_resume;     
+  extended_remote_ops.to_wait  =   remote_wait;                
+  extended_remote_ops.to_fetch_registers  =   remote_fetch_registers;
+  extended_remote_ops.to_store_registers  =   remote_store_registers;  
+  extended_remote_ops.to_prepare_to_store =   remote_prepare_to_store;
+  extended_remote_ops.to_xfer_memory  =   remote_xfer_memory;  
+  extended_remote_ops.to_files_info  =   remote_files_info;    
+  extended_remote_ops.to_insert_breakpoint =   remote_insert_breakpoint;
+  extended_remote_ops.to_remove_breakpoint =   remote_remove_breakpoint;
+  extended_remote_ops.to_terminal_init  =   NULL;              
+  extended_remote_ops.to_terminal_inferior =   NULL;           
+  extended_remote_ops.to_terminal_ours_for_output =   NULL;
+  extended_remote_ops.to_terminal_ours  =   NULL;      
+  extended_remote_ops.to_terminal_info  =   NULL;      
+  extended_remote_ops.to_kill  =   remote_kill;                
+  extended_remote_ops.to_load  =   generic_load;       
+  extended_remote_ops.to_lookup_symbol =   NULL;       
+  extended_remote_ops.to_create_inferior =   extended_remote_create_inferior;
+  extended_remote_ops.to_mourn_inferior =   extended_remote_mourn;
+  extended_remote_ops.to_can_run  =   0;                       
+  extended_remote_ops.to_notice_signals =   0;                 
+  extended_remote_ops.to_thread_alive  =   remote_thread_alive;
+  extended_remote_ops.to_stop  =   0;                  
+  extended_remote_ops.to_stratum =   process_stratum;
+  extended_remote_ops.DONT_USE =   NULL;       
+  extended_remote_ops.to_has_all_memory =   1; 
+  extended_remote_ops.to_has_memory =   1;     
+  extended_remote_ops.to_has_stack =   1;      
+  extended_remote_ops.to_has_registers =   1;  
+  extended_remote_ops.to_has_execution =   1;  
+  extended_remote_ops.to_sections =   NULL;    
+  extended_remote_ops.to_sections_end =   NULL;
+  extended_remote_ops.to_magic =   OPS_MAGIC ;
+} 
+
 
 /* This was 5 seconds, which is a long time to sit and wait.
    Unless this is going though some terminal server or multiplexer or
@@ -1311,6 +1404,16 @@ remote_xfer_memory(memaddr, myaddr, len, should_write, target)
      int should_write;
      struct target_ops *target;                        /* ignored */
 {
+#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
+  CORE_ADDR targaddr;
+  int targlen;
+  REMOTE_TRANSLATE_XFER_ADDRESS (memaddr, len, targaddr, targlen);
+  if (targlen == 0)
+    return 0;
+  memaddr = targaddr;
+  len = targlen;
+#endif
+
   return dcache_xfer_memory (remote_dcache, memaddr, myaddr, len, should_write);
 }
 
@@ -1881,100 +1984,6 @@ remote_remove_breakpoint (addr, contents_cache)
   return memory_remove_breakpoint (addr, contents_cache);
 #endif /* REMOTE_BREAKPOINT */
 }
-\f
-/* Define the target subroutine names */
-
-static struct target_ops remote_ops =
-{
-  "remote",                    /* to_shortname */
-  "Remote serial target in gdb-specific protocol",     /* to_longname */
-  "Use a remote computer via a serial line, using a gdb-specific protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
-  remote_open,                 /* to_open */
-  remote_close,                        /* to_close */
-  NULL,                                /* to_attach */
-  remote_detach,               /* to_detach */
-  remote_resume,               /* to_resume */
-  remote_wait,                 /* to_wait */
-  remote_fetch_registers,      /* to_fetch_registers */
-  remote_store_registers,      /* to_store_registers */
-  remote_prepare_to_store,     /* to_prepare_to_store */
-  remote_xfer_memory,          /* to_xfer_memory */
-  remote_files_info,           /* to_files_info */
-  remote_insert_breakpoint,    /* to_insert_breakpoint */
-  remote_remove_breakpoint,    /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  remote_kill,                 /* to_kill */
-  generic_load,                        /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  NULL,                                /* to_create_inferior */
-  remote_mourn,                        /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  remote_thread_alive,         /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
-
-static struct target_ops extended_remote_ops =
-{
-  "extended-remote",                   /* to_shortname */
-  "Extended remote serial target in gdb-specific protocol",/* to_longname */
-  "Use a remote computer via a serial line, using a gdb-specific protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
-  extended_remote_open,                        /* to_open */
-  remote_close,                        /* to_close */
-  NULL,                                /* to_attach */
-  remote_detach,               /* to_detach */
-  remote_resume,               /* to_resume */
-  remote_wait,                 /* to_wait */
-  remote_fetch_registers,      /* to_fetch_registers */
-  remote_store_registers,      /* to_store_registers */
-  remote_prepare_to_store,     /* to_prepare_to_store */
-  remote_xfer_memory,          /* to_xfer_memory */
-  remote_files_info,           /* to_files_info */
-
-  remote_insert_breakpoint,    /* to_insert_breakpoint */
-  remote_remove_breakpoint,    /* to_remove_breakpoint */
-
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  remote_kill,                 /* to_kill */
-  generic_load,                        /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  extended_remote_create_inferior,/* to_create_inferior */
-  extended_remote_mourn,       /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  remote_thread_alive,         /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
 
 /* Some targets are only capable of doing downloads, and afterwards they switch
    to the remote serial protocol.  This function provides a clean way to get
@@ -2011,9 +2020,12 @@ open_remote_target (name, from_tty, target, extended_p)
   remote_open_1 (name, from_tty, target, extended_p);
 }
 
+
 void
 _initialize_remote ()
 {
+  init_remote_ops() ;
+  init_extended__remote_ops() ;
   add_target (&remote_ops);
   add_target (&extended_remote_ops);
 
index c590652..89e1c2c 100644 (file)
@@ -860,53 +860,56 @@ sparclite_download (filename, from_tty)
 \f
 /* Define the target subroutine names */
 
-static struct target_ops sparclite_ops =
+static struct target_ops sparclite_ops ;
+
+static void init_sparclite_ops(void)
 {
-  "sparclite",                 /* to_shortname */
-  "SPARClite remote target",   /* to_longname */
-  "Use a remote SPARClite target board via a serial line, using a gdb-specific protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
-  sparclite_open,              /* to_open */
-  sparclite_close,             /* to_close */
-  0,                           /* to_attach */
-  0,                           /* to_detach */
-  0,                           /* to_resume */
-  0,                           /* to_wait */
-  0,                           /* to_fetch_registers */
-  0,                           /* to_store_registers */
-  0,                           /* to_prepare_to_store */
-  0,                           /* to_xfer_memory */
-  0,                           /* to_files_info */
-  0,                           /* to_insert_breakpoint */
-  0,                           /* to_remove_breakpoint */
-  0,                           /* to_terminal_init */
-  0,                           /* to_terminal_inferior */
-  0,                           /* to_terminal_ours_for_output */
-  0,                           /* to_terminal_ours */
-  0,                           /* to_terminal_info */
-  0,                           /* to_kill */
-  sparclite_download,          /* to_load */
-  0,                           /* to_lookup_symbol */
-  0,                           /* to_create_inferior */
-  0,                           /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  0,                           /* to_stop */
-  download_stratum,            /* to_stratum */
-  0,                           /* to_next */
-  0,                           /* to_has_all_memory */
-  0,                           /* to_has_memory */
-  0,                           /* to_has_stack */
-  0,                           /* to_has_registers */
-  0,                           /* to_has_execution */
-  0,                           /* sections */
-  0,                           /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-  };
+  sparclite_ops.to_shortname =   "sparclite";          
+  sparclite_ops.to_longname =   "SPARClite remote target";
+  sparclite_ops.to_doc =   "Use a remote SPARClite target board via a serial line; using a gdb-specific protocol.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";  
+  sparclite_ops.to_open =   sparclite_open;    
+  sparclite_ops.to_close =   sparclite_close;  
+  sparclite_ops.to_attach =   0;       
+  sparclite_ops.to_detach =   0;       
+  sparclite_ops.to_resume =   0;       
+  sparclite_ops.to_wait  =   0;                
+  sparclite_ops.to_fetch_registers  =   0;
+  sparclite_ops.to_store_registers  =   0;
+  sparclite_ops.to_prepare_to_store =   0;
+  sparclite_ops.to_xfer_memory  =   0;         
+  sparclite_ops.to_files_info  =   0;          
+  sparclite_ops.to_insert_breakpoint =   0;    
+  sparclite_ops.to_remove_breakpoint =   0;    
+  sparclite_ops.to_terminal_init  =   0;       
+  sparclite_ops.to_terminal_inferior =   0;    
+  sparclite_ops.to_terminal_ours_for_output =   0;
+  sparclite_ops.to_terminal_ours  =   0;               
+  sparclite_ops.to_terminal_info  =   0;               
+  sparclite_ops.to_kill  =   0;                        
+  sparclite_ops.to_load  =   sparclite_download;
+  sparclite_ops.to_lookup_symbol =   0;                
+  sparclite_ops.to_create_inferior =   0;      
+  sparclite_ops.to_mourn_inferior =   0;       
+  sparclite_ops.to_can_run  =   0;             
+  sparclite_ops.to_notice_signals =   0;       
+  sparclite_ops.to_thread_alive  =   0;                
+  sparclite_ops.to_stop  =   0;                        
+  sparclite_ops.to_stratum =   download_stratum;
+  sparclite_ops.DONT_USE =   0;                        
+  sparclite_ops.to_has_all_memory =   0;       
+  sparclite_ops.to_has_memory =   0;           
+  sparclite_ops.to_has_stack =   0;            
+  sparclite_ops.to_has_registers =   0;                
+  sparclite_ops.to_has_execution =   0;                
+  sparclite_ops.to_sections =   0;             
+  sparclite_ops.to_sections_end =   0;         
+  sparclite_ops.to_magic =   OPS_MAGIC ;       
+} /* init_sparclite_ops */
 
 void
 _initialize_sparcl_tdep ()
 {
+  init_sparclite_ops() ;
   add_target (&sparclite_ops);
 }
index 43da8e4..5e0ca67 100755 (executable)
@@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbthread.h"
 #endif
 #define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#include <windows.h> 
 
 /* Prototypes for local functions */
 
@@ -73,6 +73,8 @@ static int v850ice_remove_breakpoint PARAMS ((CORE_ADDR, char *));
 
 static int ice_open = 0;
 
+static struct target_ops v850ice_ops ; 
+
 #ifndef EXPORT
 #define EXPORT __declspec(dllexport)
 #endif
@@ -151,7 +153,6 @@ EXPORT long __stdcall GdbCallBack (void);
 #define StatHardBreak  10  /* hit hardware breakpoint */
 #define StatFailure    11  /* an error occured in the last run/single */
 
-extern struct target_ops v850ice_ops;  /* Forward decl */
 
 /*   "pir", "tkcw", "chcw", "adtre" */
 
@@ -501,51 +502,54 @@ v850ice_mourn ()
 
 /* Define the target subroutine names */
 
-struct target_ops v850ice_ops = {
-  "ice",                       /* to_shortname */
-  "NEC V850 ICE interface",    /* to_longname */
-  "Debug a system controlled by a NEC 850 ICE.", /* to_doc */
-  v850ice_open,                        /* to_open */
-  v850ice_close,               /* to_close */
-  NULL,                                /* to_attach */
-  v850ice_detach,              /* to_detach */
-  v850ice_resume,              /* to_resume */
-  v850ice_wait,                        /* to_wait */
-  v850ice_fetch_registers,     /* to_fetch_registers */
-  v850ice_store_registers,     /* to_store_registers */
-  v850ice_prepare_to_store,    /* to_prepare_to_store */
-  v850ice_xfer_memory,         /* to_xfer_memory */
-  v850ice_files_info,          /* to_files_info */
-  v850ice_insert_breakpoint,   /* to_insert_breakpoint */
-  v850ice_remove_breakpoint,   /* to_remove_breakpoint */
-  NULL,                                /* to_terminal_init */
-  NULL,                                /* to_terminal_inferior */
-  NULL,                                /* to_terminal_ours_for_output */
-  NULL,                                /* to_terminal_ours */
-  NULL,                                /* to_terminal_info */
-  v850ice_kill,                        /* to_kill */
-  generic_load,                        /* to_load */
-  NULL,                                /* to_lookup_symbol */
-  NULL,                                /* to_create_inferior */
-  v850ice_mourn,               /* to_mourn_inferior */
-  0,                           /* to_can_run */
-  0,                           /* to_notice_signals */
-  NULL,                                /* to_thread_alive */
-  0,                           /* to_stop */
-  process_stratum,             /* to_stratum */
-  NULL,                                /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  NULL,                                /* sections */
-  NULL,                                /* sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+
+static void init_850ice_ops(void)
+{
+  v850ice_ops.to_shortname   =   "ice";                
+  v850ice_ops.to_longname    =   "NEC V850 ICE interface";
+  v850ice_ops.to_doc         =   "Debug a system controlled by a NEC 850 ICE.";
+  v850ice_ops.to_open        =   v850ice_open;         
+  v850ice_ops.to_close       =   v850ice_close;        
+  v850ice_ops.to_attach      =   NULL;         
+  v850ice_ops.to_detach      =   v850ice_detach;       
+  v850ice_ops.to_resume      =   v850ice_resume;       
+  v850ice_ops.to_wait        =   v850ice_wait; 
+  v850ice_ops.to_fetch_registers  =   v850ice_fetch_registers;
+  v850ice_ops.to_store_registers  =   v850ice_store_registers;
+  v850ice_ops.to_prepare_to_store =   v850ice_prepare_to_store;
+  v850ice_ops.to_xfer_memory =   v850ice_xfer_memory;  
+  v850ice_ops.to_files_info  =   v850ice_files_info;   
+  v850ice_ops.to_insert_breakpoint =   v850ice_insert_breakpoint;
+  v850ice_ops.to_remove_breakpoint =   v850ice_remove_breakpoint;
+  v850ice_ops.to_terminal_init    =   NULL;            
+  v850ice_ops.to_terminal_inferior =   NULL;           
+  v850ice_ops.to_terminal_ours_for_output =   NULL;    
+  v850ice_ops.to_terminal_ours   =   NULL;             
+  v850ice_ops.to_terminal_info   =   NULL;             
+  v850ice_ops.to_kill            =   v850ice_kill;             
+  v850ice_ops.to_load            =   generic_load;             
+  v850ice_ops.to_lookup_symbol   =   NULL;             
+  v850ice_ops.to_create_inferior =   NULL;             
+  v850ice_ops.to_mourn_inferior  =   v850ice_mourn;
+  v850ice_ops.to_can_run         =   0;                
+  v850ice_ops.to_notice_signals  =   0;                
+  v850ice_ops.to_thread_alive    =    NULL;    
+  v850ice_ops.to_stop            =   0;                        
+  v850ice_ops.to_stratum         =   process_stratum;  
+  v850ice_ops.DONT_USE           =   NULL;             
+  v850ice_ops.to_has_all_memory  =   1;                
+  v850ice_ops.to_has_memory      =   1;                
+  v850ice_ops.to_has_stack       =   1;                
+  v850ice_ops.to_has_registers   =   1;                
+  v850ice_ops.to_has_execution   =   1;                
+  v850ice_ops.to_sections        =   NULL;             
+  v850ice_ops.to_sections_end    =   NULL;             
+  v850ice_ops.to_magic           =   OPS_MAGIC ;
+}
 
 void
 _initialize_v850ice ()
 {
+  init_850ice_ops() ;
   add_target (&v850ice_ops);
 }
index be83b7a..d6c6e1f 100644 (file)
@@ -886,54 +886,57 @@ child_close ()
   DEBUG_EVENTS (("gdb: child_close, inferior_pid=%d\n", inferior_pid));
 }
 
-struct target_ops child_ops =
+struct target_ops child_ops ;
+
+static void init_child_ops(void)
 {
-  "child",                     /* to_shortname */
-  "Win32 child process",       /* to_longname */
-  "Win32 child process (started by the \"run\" command).",     /* to_doc */
-  child_open,                  /* to_open */
-  child_close,                 /* to_close */
-  child_attach,                        /* to_attach */
-  child_detach,                        /* to_detach */
-  child_resume,                        /* to_resume */
-  child_wait,                  /* to_wait */
-  child_fetch_inferior_registers,/* to_fetch_registers */
-  child_store_inferior_registers,/* to_store_registers */
-  child_prepare_to_store,      /* to_child_prepare_to_store */
-  child_xfer_memory,           /* to_xfer_memory */
-  child_files_info,            /* to_files_info */
-  memory_insert_breakpoint,    /* to_insert_breakpoint */
-  memory_remove_breakpoint,    /* to_remove_breakpoint */
-  terminal_init_inferior,      /* to_terminal_init */
-  terminal_inferior,           /* to_terminal_inferior */
-  terminal_ours_for_output,    /* to_terminal_ours_for_output */
-  terminal_ours,               /* to_terminal_ours */
-  child_terminal_info,         /* to_terminal_info */
-  child_kill_inferior,         /* to_kill */
-  0,                           /* to_load */
-  0,                           /* to_lookup_symbol */
-  child_create_inferior,       /* to_create_inferior */
-  child_mourn_inferior,                /* to_mourn_inferior */
-  child_can_run,               /* to_can_run */
-  0,                           /* to_notice_signals */
-  0,                           /* to_thread_alive */
-  child_stop,                  /* to_stop */
-  process_stratum,             /* to_stratum */
-  0,                           /* to_next */
-  1,                           /* to_has_all_memory */
-  1,                           /* to_has_memory */
-  1,                           /* to_has_stack */
-  1,                           /* to_has_registers */
-  1,                           /* to_has_execution */
-  0,                           /* to_sections */
-  0,                           /* to_sections_end */
-  OPS_MAGIC                    /* to_magic */
-};
+  child_ops.to_shortname =   "child";                  
+  child_ops.to_longname =   "Win32 child process";
+  child_ops.to_doc =   "Win32 child process (started by the \"run\" command).";        
+  child_ops.to_open =   child_open;            
+  child_ops.to_close =   child_close;          
+  child_ops.to_attach =   child_attach;                
+  child_ops.to_detach =   child_detach;                
+  child_ops.to_resume =   child_resume;                
+  child_ops.to_wait  =   child_wait;           
+  child_ops.to_fetch_registers  =   child_fetch_inferior_registers;
+  child_ops.to_store_registers  =   child_store_inferior_registers;
+  child_ops.to_prepare_to_store =   child_prepare_to_store;    
+  child_ops.to_xfer_memory  =   child_xfer_memory;             
+  child_ops.to_files_info  =   child_files_info;               
+  child_ops.to_insert_breakpoint =   memory_insert_breakpoint;
+  child_ops.to_remove_breakpoint =   memory_remove_breakpoint;
+  child_ops.to_terminal_init  =   terminal_init_inferior;
+  child_ops.to_terminal_inferior =   terminal_inferior;        
+  child_ops.to_terminal_ours_for_output =   terminal_ours_for_output;
+  child_ops.to_terminal_ours  =   terminal_ours;       
+  child_ops.to_terminal_info  =   child_terminal_info; 
+  child_ops.to_kill  =   child_kill_inferior;  
+  child_ops.to_load  =   0;                    
+  child_ops.to_lookup_symbol =   0;                            
+  child_ops.to_create_inferior =   child_create_inferior;
+  child_ops.to_mourn_inferior =   child_mourn_inferior;        
+  child_ops.to_can_run  =   child_can_run;     
+  child_ops.to_notice_signals =   0;           
+  child_ops.to_thread_alive  =   0;            
+  child_ops.to_stop  =   child_stop;           
+  child_ops.to_stratum =   process_stratum;
+  child_ops.DONT_USE =   0;            
+  child_ops.to_has_all_memory =   1;   
+  child_ops.to_has_memory =   1;       
+  child_ops.to_has_stack =   1;                
+  child_ops.to_has_registers =   1;    
+  child_ops.to_has_execution =   1;    
+  child_ops.to_sections =   0;         
+  child_ops.to_sections_end =   0;     
+  child_ops.to_magic =   OPS_MAGIC;
+}
 
 void
 _initialize_inftarg ()
 {
   struct cmd_list_element *c;
+  init_child_ops() ;
 
   add_show_from_set
     (add_set_cmd ("new-console", class_support, var_boolean,