aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-aix-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-12-18 14:52:59 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-12-18 14:52:59 +0000
commitd5367fe16e4948e9480e49302ab350d9a9c14a50 (patch)
tree0706d0cf8090c15a8647b54b7e9f9363a6257e3d /gdb/rs6000-aix-tdep.c
parent8d708c8cad07b1d961c7d0a30040116d79134e92 (diff)
downloadgdb-d5367fe16e4948e9480e49302ab350d9a9c14a50.zip
gdb-d5367fe16e4948e9480e49302ab350d9a9c14a50.tar.gz
gdb-d5367fe16e4948e9480e49302ab350d9a9c14a50.tar.bz2
Port GDB to powerpc-lynx178.
gdb/ChangeLog: * defs.h (enum gdb_osabi): Add GDB_OSABI_LYNXOS178. * osabi.c (gdb_osabi_names): Add entry for GDB_OSABI_LYNXOS178. * xcoffread.c (xcoff_get_core_n_import_files): New function. (xcoff_get_n_import_files): New function. * xcoffread.h (xcoffread.h): Add declaration. * rs6000-aix-tdep.c: #include "xcoffread.h". (rs6000_aix_osabi_sniffer): Do not return GDB_OSABI_AIX for XCOFF executables that do not depend on any shared library. * rs6000-lynx178-tdep.c: New file. * configure.tgt: Add powerpc-*-lynx*178 handling. * Makefile.in (ALL_TARGET_OBS): Add rs6000-lynx178-tdep.o. (ALLDEPFILES): Add rs6000-lynx178-tdep.c.
Diffstat (limited to 'gdb/rs6000-aix-tdep.c')
-rw-r--r--gdb/rs6000-aix-tdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index b4fc931..8b1c416 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -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
@@ -739,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;
}