/* OS ABI variant handling for GDB.
- Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
"OpenBSD ELF",
"Windows CE",
"DJGPP",
- "NetWare",
"Irix",
- "LynxOS",
"Interix",
"HP/UX ELF",
"HP/UX SOM",
"QNX Neutrino",
"Cygwin",
+ "AIX",
"<invalid>"
};
return user_selected_osabi;
/* If we don't have a binary, return the default OS ABI (if set) or
- an inconclusive result (otherwise). */
+ unknown (otherwise). */
if (abfd == NULL)
- {
- if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
- return GDB_OSABI_DEFAULT;
- else
- return GDB_OSABI_UNINITIALIZED;
- }
+ return GDB_OSABI_DEFAULT;
match = GDB_OSABI_UNKNOWN;
match_specific = 0;
/* The FreeBSD folks have been naughty; they stored the string
"FreeBSD" in the padding of the e_ident field of the ELF
header to "brand" their ELF binaries in FreeBSD 3.x. */
- if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
+ if (memcmp (&elf_elfheader (abfd)->e_ident[8],
+ "FreeBSD", sizeof ("FreeBSD")) == 0)
osabi = GDB_OSABI_FREEBSD_ELF;
}