2004-07-31 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / nto-tdep.c
index 631290c56f1d4bdf4987d617973ce232c1657a72..50b4fc576291b28aaae5ea5a85782d37ea16c296 100644 (file)
@@ -1,6 +1,6 @@
 /* nto-tdep.c - general QNX Neutrino target functionality.
 
-   Copyright 2003 Free Software Foundation, Inc.
+   Copyright 2003, 2004 Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -72,7 +72,7 @@ nto_map_arch_to_cputype (const char *arch)
 {
   if (!strcmp (arch, "i386") || !strcmp (arch, "x86"))
     return CPUTYPE_X86;
-  if (!strcmp (arch, "rs6000") || !strcmp (arch, "ppc"))
+  if (!strcmp (arch, "rs6000") || !strcmp (arch, "powerpc"))
     return CPUTYPE_PPC;
   if (!strcmp (arch, "mips"))
     return CPUTYPE_MIPS;
@@ -97,7 +97,8 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
       arch = "x86";
       endian = "";
     }
-  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0)
+  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
+          || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
     {
       arch = "ppc";
       endian = "be";
@@ -114,7 +115,7 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
   sprintf (buf, path_fmt, arch_path, arch_path, arch_path, arch_path,
           arch_path);
 
-  return openp (buf, 1, solib, o_flags, 0, temp_pathname);
+  return openp (buf, OPF_TRY_CWD_FIRST, solib, o_flags, 0, temp_pathname);
 }
 
 void
@@ -130,7 +131,8 @@ nto_init_solib_absolute_prefix (void)
       arch = "x86";
       endian = "";
     }
-  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0)
+  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
+          || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
     {
       arch = "ppc";
       endian = "be";
@@ -270,26 +272,19 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
 {
   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
@@ -311,19 +306,15 @@ static struct core_fns regset_core_fns = {
 void
 _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\
-When non-zero, nto specific debug info is\n\
-displayed. Different information is displayed\n\
-for different positive values.", &setdebuglist),
-                    &showdebuglist);
-                    */
-  add_setshow_cmd ("nto-debug", class_maintenance, var_zinteger,
-                 &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
+  add_setshow_zinteger_cmd ("nto-debug", class_maintenance,
+                           &nto_internal_debugging, "\
+Set QNX NTO internal debugging.", "\
+Show QNX NTO internal debugging.", "\
 When non-zero, nto specific debug info is\n\
 displayed. Different information is displayed\n\
-for different positive values.",  "Show QNX NTO internal debugging.\n",
-                 NULL, NULL, &setdebuglist, &showdebuglist);
+for different positive values.", "\
+QNX NTO internal debugging is %s.",
+                           NULL, NULL, &setdebuglist, &showdebuglist);
 
   /* We use SIG45 for pulses, or something, so nostop, noprint
      and pass them.  */
@@ -345,5 +336,5 @@ for different positive values.",  "Show QNX NTO internal debugging.\n",
 #endif
 
   /* Register core file support.  */
-  add_core_fns (&regset_core_fns);
+  deprecated_add_core_fns (&regset_core_fns);
 }
This page took 0.04335 seconds and 4 git commands to generate.