diff options
author | Nick Clifton <nickc@redhat.com> | 2008-04-18 09:22:24 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-04-18 09:22:24 +0000 |
commit | e0c880965cab990eed0a9236b677b5a7bf5d5559 (patch) | |
tree | 3600b4d24d626fdef42e446ab463c9fb6602af9c /bfd/rs6000-core.c | |
parent | da6fa31a22d1d125309859f7b4322e3cd6977d90 (diff) | |
download | gdb-e0c880965cab990eed0a9236b677b5a7bf5d5559.zip gdb-e0c880965cab990eed0a9236b677b5a7bf5d5559.tar.gz gdb-e0c880965cab990eed0a9236b677b5a7bf5d5559.tar.bz2 |
* aix5ppc-core.c: Define macros for the default architecture and
machine for matching core files.
(xcoff64_core_p): Set the architecture and machine to the default
values defined in the macros mentioned above.
* rs6000-core.c: Define macros to determine whether or not the
core file header uses the core_dumpxx header format.
(rs6000coff_core_p): Don't match core files that use the
core_dumpxx header format.
Diffstat (limited to 'bfd/rs6000-core.c')
-rw-r--r-- | bfd/rs6000-core.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bfd/rs6000-core.c b/bfd/rs6000-core.c index eb0eb52..ad7bef9 100644 --- a/bfd/rs6000-core.c +++ b/bfd/rs6000-core.c @@ -1,6 +1,6 @@ /* IBM RS/6000 "XCOFF" back-end for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001, 2002, 2004, 2006, 2007 + 2001, 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore. Archive support from Damon A. Permezel. @@ -136,6 +136,19 @@ typedef union { # define CORE_NEW(c) 0 #endif +/* Return whether CoreHdr C usese core_dumpxx structure. + + FIXME: the core file format version number used here definitely indicates + that struct core_dumpxx should be used to represent the core file header, + but that may not be the only such format version number. */ + +#ifdef AIX_5_CORE +# define CORE_DUMPXX_VERSION 267312562 +# define CNEW_IS_CORE_DUMPXX(c) ((c).new.c_version == CORE_DUMPXX_VERSION) +#else +# define CNEW_IS_CORE_DUMPXX(c) 0 +#endif + /* Return the c_stackorg field from struct core_dumpx C. */ #ifdef AIX_CORE_DUMPX_CORE @@ -329,6 +342,13 @@ rs6000coff_core_p (bfd *abfd) return NULL; } + /* This isn't the right handler for 64-bit core files on AIX 5.x. */ + if (CORE_NEW (core) && CNEW_IS_CORE_DUMPXX (core)) + { + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + /* Copy fields from new or old core structure. */ if (CORE_NEW (core)) { |