Add basic support for AArch64.
[deliverable/binutils-gdb.git] / gdb / rs6000-aix-tdep.c
index 06b43de217a24ca97ffdafeeb525556975457048..0b70ad1670c903c509f80fe0736cadb40999f72b 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -35,6 +35,7 @@
 #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
@@ -719,6 +720,14 @@ rs6000_software_single_step (struct frame_info *frame)
   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,
@@ -731,6 +740,13 @@ rs6000_aix_osabi_sniffer (bfd *abfd)
 {
   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;
 }
 
@@ -775,6 +791,8 @@ rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
     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.  */
This page took 0.024564 seconds and 4 git commands to generate.