/* 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.
{
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;
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";
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
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";
{
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 *) ®set, core_reg_sect,
min (core_reg_size, sizeof (regset)));
nto_supply_gregset ((char *) ®set);
}
- else if (which == NTO_REG_FLOAT)
+ else if (which == 2)
{
memcpy ((char *) ®set, core_reg_sect,
min (core_reg_size, sizeof (regset)));
nto_supply_fpregset ((char *) ®set);
}
- else if (which == NTO_REG_ALT)
- {
- memcpy ((char *) ®set, core_reg_sect,
- min (core_reg_size, sizeof (regset)));
- nto_supply_altregset ((char *) ®set);
- }
}
void
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. */
#endif
/* Register core file support. */
- add_core_fns (®set_core_fns);
+ deprecated_add_core_fns (®set_core_fns);
}