Remove convert_{to,from}_virtual members from target structs.
authorJohn Gilmore <gnu@cygnus>
Fri, 18 Sep 1992 09:56:28 +0000 (09:56 +0000)
committerJohn Gilmore <gnu@cygnus>
Fri, 18 Sep 1992 09:56:28 +0000 (09:56 +0000)
13 files changed:
gdb/core.c
gdb/exec.c
gdb/remote-adapt.c
gdb/remote-eb.c
gdb/remote-es1800.c
gdb/remote-hms.c
gdb/remote-mm.c
gdb/remote-nindy.c
gdb/remote-st2000.c
gdb/remote-udi.c
gdb/remote-vx.c
gdb/remote.c
gdb/xcoffexec.c

index 032ddb929dea7ad6eef596bb3da6a0dc10002301..dc2cf24d23e82ff760da8e05a12809d1231e94dc 100644 (file)
@@ -435,7 +435,7 @@ struct target_ops core_ops = {
        core_open, core_close,
        child_attach, core_detach, 0, 0, /* resume, wait */
        get_core_registers, 
-       0, 0, 0, 0, /* store_regs, prepare_to_store, conv_to, conv_from */
+       0, 0, /* store_regs, prepare_to_store */
        xfer_memory, core_files_info,
        0, 0, /* core_insert_breakpoint, core_remove_breakpoint, */
        0, 0, 0, 0, 0, /* terminal stuff */
index 79b07e499e5d8d463b58717a2bfd26e2621dca08..9e6167589b467c31788ad444fec6ff2feb051622 100644 (file)
@@ -410,7 +410,7 @@ Specify the filename of the executable file.",
        exec_file_command, exec_close, /* open, close */
        child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
        0, 0, /* fetch_registers, store_registers, */
-       0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+       0, /* prepare_to_store, */
        xfer_memory, exec_files_info,
        0, 0, /* insert_breakpoint, remove_breakpoint, */
        0, 0, 0, 0, 0, /* terminal stuff */
index a21cbb823b49ee045f22111cb1e24ce4d5beeaaa..f8a3271a41cbf8668658a2a5c7f2ce94a654900c 100644 (file)
@@ -1415,7 +1415,7 @@ struct target_ops adapt_ops = {
        adapt_open, adapt_close, 
        adapt_attach, adapt_detach, adapt_resume, adapt_wait,
        adapt_fetch_register, adapt_store_register,
-       adapt_prepare_to_store, 0, 0,   /* conv_to, conv_from */
+       adapt_prepare_to_store,
        adapt_xfer_inferior_memory, 
        adapt_files_info,
        adapt_insert_breakpoint, adapt_remove_breakpoint, /* Breakpoints */
index a4124b3ac659cd126e3eea6a74f9b45810d65bc0..575f7cccc84873a0323f5b655e60533bdfbbf042 100644 (file)
@@ -978,7 +978,7 @@ executable as it exists on the remote computer.  For example,\n\
        eb_open, eb_close, 
        0, eb_detach, eb_resume, eb_wait,
        eb_fetch_register, eb_store_register,
-       eb_prepare_to_store, 0, 0,      /* conv_to, conv_from */
+       eb_prepare_to_store,
        eb_xfer_inferior_memory, eb_files_info,
        0, 0,   /* Breakpoints */
        0, 0, 0, 0, 0,  /* Terminal handling */
index f32440bbef51089eb50f11791866597e7231f5cd..9a542e04250a0180ca08cfe343d0680fae9b7003 100644 (file)
@@ -2173,8 +2173,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
   NULL,                                /* to_fetch_registers */
   NULL,                                /* to_store_registers */
   es1800_prepare_to_store,     /* to_prepare_to_store */
-  NULL,                                /* to_convert_to_virtual */
-  NULL,                                /* to_convert_from_virtual */
   es1800_xfer_inferior_memory, /* to_xfer_memory */
   es1800_files_info,           /* to_files_info */
   es1800_insert_breakpoint,    /* to_insert_breakpoint */
@@ -2220,8 +2218,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
   es1800_fetch_register,       /* to_fetch_registers */
   es1800_store_register,       /* to_store_registers */
   es1800_prepare_to_store,     /* to_prepare_to_store */
-  NULL,                                /* to_convert_to_virtual */
-  NULL,                                /* to_convert_from_virtual */
   es1800_xfer_inferior_memory, /* to_xfer_memory */
   es1800_files_info,           /* to_files_info */
   es1800_insert_breakpoint,    /* to_insert_breakpoint */
index e000957758ccc4d744c86105b18c06161ec7411e..7b0e7b0afcf3ea7e5590b2944bc7d116d64942e0 100644 (file)
@@ -1395,7 +1395,7 @@ by a serial line.",
        hms_open, hms_close, 
        hms_attach, hms_detach, hms_resume, hms_wait,
        hms_fetch_register, hms_store_register,
-       hms_prepare_to_store, 0, 0,     /* conv_to, conv_from */
+       hms_prepare_to_store,
        hms_xfer_inferior_memory, 
        hms_files_info,
        hms_insert_breakpoint, hms_remove_breakpoint, /* Breakpoints */
index 19bff73c7b8844c52fdb510bc5bfa9f6e2108ed3..b98026c1be96253663202f8653bc9cac656ea04f 100644 (file)
@@ -1673,7 +1673,7 @@ struct target_ops mm_ops = {
         mm_open, mm_close,
         mm_attach, mm_detach, mm_resume, mm_wait,
         mm_fetch_registers, mm_store_registers,
-        mm_prepare_to_store, 0, 0,   /* conv_to, conv_from */
+        mm_prepare_to_store,
         mm_xfer_inferior_memory,
         mm_files_info,
         mm_insert_breakpoint, mm_remove_breakpoint, /* Breakpoints */
index 1e38f3d3bd412f4117582a6fddc53f8358a9890a..dcc552a1fa2900e3a9f3df3d3f80beb56ea6b09a 100644 (file)
@@ -932,7 +932,7 @@ 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, 0, 0, /* conv_from, conv_to */
+       nindy_prepare_to_store,
        nindy_xfer_inferior_memory, nindy_files_info,
        0, 0, /* insert_breakpoint, remove_breakpoint, */
        0, 0, 0, 0, 0,  /* Terminal crud */
index 0c70ec05ca33e1d37c454d2c06be2beb9270091c..f7904fa9d5062cdd9bd7e5d4693fef8eaab39d19 100644 (file)
@@ -781,8 +781,6 @@ the speed to connect at in bits per second.",
   st2000_fetch_register,
   st2000_store_register,
   st2000_prepare_to_store,
-  0,
-  0,                           /* conv_to, conv_from */
   st2000_xfer_inferior_memory,
   st2000_files_info,
   st2000_insert_breakpoint,
index 9794efbb3ed70d88e02035ef4f3d7833f8abea99..4309774a5a44f076bf0a1e76bda2e5aec8f098bf 100644 (file)
@@ -1332,7 +1332,7 @@ static struct target_ops udi_ops = {
         udi_open, udi_close,
         udi_attach, udi_detach, udi_resume, udi_wait,
         udi_fetch_registers, udi_store_registers,
-        udi_prepare_to_store, 0, 0,   /* conv_to, conv_from */
+        udi_prepare_to_store,
         udi_xfer_inferior_memory,
         udi_files_info,
         udi_insert_breakpoint, udi_remove_breakpoint, /* Breakpoints */
index 635ffe3aa783d28d709618e31a26e308d0a601aa..de9aa65f2e056b9b2c657409d4bcd4179802947c 100644 (file)
@@ -55,8 +55,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 extern void symbol_file_command ();
 extern int stop_soon_quietly;          /* for wait_for_inferior */
-extern void host_convert_to_virtual ();
-extern void host_convert_from_virtual ();
 
 static int net_ptrace_clnt_call ();    /* Forward decl */
 static enum clnt_stat net_clnt_call ();        /* Forward decl */
@@ -1333,7 +1331,7 @@ 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, host_convert_to_virtual, host_convert_from_virtual,  /* prep_to_store, */
+       0, /* prep_to_store, */
        vx_xfer_memory, vx_files_info,
        0, 0, /* insert_breakpoint, remove_breakpoint */
        0, 0, 0, 0, 0,  /* terminal stuff */
@@ -1355,7 +1353,7 @@ struct target_ops vx_run_ops = {
        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, host_convert_to_virtual, host_convert_from_virtual,
+       vx_prepare_to_store,
        vx_xfer_memory, vx_run_files_info,
        vx_insert_breakpoint, vx_remove_breakpoint,
        0, 0, 0, 0, 0,  /* terminal stuff */
index 03d4deeb093d29653b412ae4165f6273ad7d85a6..86df56a8e48947d00106a8513d9bad9eeafd0697 100644 (file)
@@ -270,7 +270,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
 
   if (baud_rate)
     {
-      if (1 != sscanf (baud_rate, "%d ", &a_rate))
+      if (sscanf (baud_rate, "%d", &a_rate) == 1)
        {
          b_rate = damn_b (a_rate);
          baudrate_set = 1;
@@ -416,8 +416,8 @@ remote_wait (status)
   void (*ofunc)();
   unsigned char *p;
   int i;
-  int regno;
-  unsigned char regs[8];       /* Better be big enough for largest reg */
+  long regno;
+  unsigned char regs[MAX_REGISTER_RAW_SIZE];
 
   WSETEXIT ((*status), 0);
 
@@ -430,15 +430,21 @@ remote_wait (status)
   if (buf[0] == 'T')
     {
       /* Expedited reply, containing Signal, {regno, reg} repeat */
+      /*  format is:  'Tssn...:r...;n...:r...;n...:r...;#cc', where
+         ss = signal number
+         n... = register number
+         r... = register contents
+         */
+
       p = &buf[3];             /* after Txx */
 
       while (*p)
        {
-         regno = fromhex (p[0]) * 16 + fromhex (p[1]);
-         p += 2;
-         if (regno >= NUM_REGS)
-           error ("Remote sent illegal register number %d (0x%x)", regno,
-                  regno);
+         regno = strtol (p, &p, 16); /* Read the register number */
+
+         if (*p++ != ':'
+             || regno >= NUM_REGS)
+           error ("Remote sent bad register number %s", buf);
 
          for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
            {
@@ -448,6 +454,9 @@ remote_wait (status)
              p += 2;
            }
 
+         if (*p++ != ';')
+           error("Remote register badly formatted: %s", buf);
+
          supply_register (regno, regs);
        }
     }
@@ -1045,8 +1054,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",  /* to_doc */
   remote_fetch_registers,      /* to_fetch_registers */
   remote_store_registers,      /* to_store_registers */
   remote_prepare_to_store,     /* to_prepare_to_store */
-  NULL,                                /* to_convert_to_virtual */
-  NULL,                                /* to_convert_from_virtual */
   remote_xfer_memory,          /* to_xfer_memory */
   remote_files_info,           /* to_files_info */
   NULL,                                /* to_insert_breakpoint */
index d4586ee8288cb328b39ddc691c17cb219cf124d7..ddc1d23c1d85f5d6d84fcd0b088e5626eb9a7b64 100644 (file)
@@ -991,7 +991,7 @@ Specify the filename of the executable file.",
        exec_file_command, exec_close, /* open, close */
        child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
        0, 0, /* fetch_registers, store_registers, */
-       0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+       0, /* prepare_to_store */
        xfer_memory, exec_files_info,
        0, 0, /* insert_breakpoint, remove_breakpoint, */
        0, 0, 0, 0, 0, /* terminal stuff */