/* Native support code for PPC AIX, for GDB the GNU debugger.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Free Software Foundation, Inc.
#include "rs6000-tdep.h"
#include "ppc-tdep.h"
#include "exceptions.h"
+#include "xcoffread.h"
/* Hook for determining the TOC address when calling functions in the
inferior under AIX. The initialization code in rs6000-nat.c sets
return 1;
}
+/* Implement the "auto_wide_charset" gdbarch method for this platform. */
+
+static const char *
+rs6000_aix_auto_wide_charset (void)
+{
+ return "UTF-16";
+}
+
/* Implement an osabi sniffer for RS6000/AIX.
This function assumes that ABFD's flavour is XCOFF. In other words,
{
gdb_assert (bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
+ /* The only noticeable difference between Lynx178 XCOFF files and
+ AIX XCOFF files comes from the fact that there are no shared
+ libraries on Lynx178. On AIX, we are betting that an executable
+ linked with no shared library will never exist. */
+ if (xcoff_get_n_import_files (abfd) <= 0)
+ return GDB_OSABI_UNKNOWN;
+
return GDB_OSABI_AIX;
}
set_gdbarch_frame_red_zone_size (gdbarch, 224);
else
set_gdbarch_frame_red_zone_size (gdbarch, 0);
+
+ set_gdbarch_auto_wide_charset (gdbarch, rs6000_aix_auto_wide_charset);
}
/* Provide a prototype to silence -Wmissing-prototypes. */