2003-06-01 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / nto-tdep.c
index abf63b912919bd216639b46f8680bcbc874ac5ee..94f156e571b4bce85973a07b3a8a17a2f31ebbe6 100644 (file)
@@ -21,7 +21,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <sys/stat.h>
+#include "gdb_stat.h"
 #include "gdb_string.h"
 #include "nto-tdep.h"
 #include "top.h"
@@ -269,27 +269,20 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
                      int which, CORE_ADDR reg_addr)
 {
   nto_regset_t regset;
-
-  nto_init_solib_absolute_prefix ();
-
-  if (which == NTO_REG_GENERAL)
+  
+/* See corelow.c:get_core_registers for values of WHICH.  */
+  if (which == 0)
     {
       memcpy ((char *) &regset, core_reg_sect,
              min (core_reg_size, sizeof (regset)));
       nto_supply_gregset ((char *) &regset);
     }
-  else if (which == NTO_REG_FLOAT)
+  else if (which == 2)
     {
       memcpy ((char *) &regset, core_reg_sect,
              min (core_reg_size, sizeof (regset)));
       nto_supply_fpregset ((char *) &regset);
     }
-  else if (which == NTO_REG_ALT)
-    {
-      memcpy ((char *) &regset, core_reg_sect,
-             min (core_reg_size, sizeof (regset)));
-      nto_supply_altregset ((char *) &regset);
-    }
 }
 
 void
@@ -309,13 +302,14 @@ static struct core_fns regset_core_fns = {
 };
 
 void
-_initialize_nto_tdep ()
+_initialize_nto_tdep (void)
 {
-  add_show_from_set (add_set_cmd ("nto-debug", class_maintenance, var_zinteger, (char *) &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
+  add_setshow_cmd ("nto-debug", class_maintenance, var_zinteger,
+                 &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
 When non-zero, nto specific debug info is\n\
 displayed. Different information is displayed\n\
-for different positive values.", &setdebuglist),
-                    &showdebuglist);
+for different positive values.",  "Show QNX NTO internal debugging.\n",
+                 NULL, NULL, &setdebuglist, &showdebuglist);
 
   /* We use SIG45 for pulses, or something, so nostop, noprint
      and pass them.  */
This page took 0.023825 seconds and 4 git commands to generate.