From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13266 invoked by alias); 15 Mar 2009 20:33:29 -0000 Received: (qmail 13255 invoked by uid 22791); 15 Mar 2009 20:33:29 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Mar 2009 20:33:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0F5262BAB5F for ; Sun, 15 Mar 2009 16:33:22 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5HOxbheoRjbQ for ; Sun, 15 Mar 2009 16:33:22 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E82EE2BAB48 for ; Sun, 15 Mar 2009 16:33:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D1A8CF5C3F; Sun, 15 Mar 2009 13:33:20 -0700 (PDT) Date: Sun, 15 Mar 2009 20:37:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit/AIX] Fix error happening while loading a core file Message-ID: <20090315203320.GB9576@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="RASg3xLB4tUQ4RcS" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00243.txt.bz2 --RASg3xLB4tUQ4RcS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 677 This is another regression that I noticed on AIX. The problem is that we had a check in xcoff_relocate_symtab that was supposed to detect the case where we're debugging a core file. The check was based on the inferior ptid being null. I replaced it with a check against target_has_execution, which seemed more appropriate. Is there a routine that performs this check? 2009-03-15 Joel Brobecker Fix an error happening while loading symbols from a core file. * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution to detect whether we're debugging a core file or not. Tested on powerpc-aix. Checked in. -- Joel --RASg3xLB4tUQ4RcS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="rs6000-nat.diff" Content-length: 452 Index: rs6000-nat.c =================================================================== --- rs6000-nat.c (revision 146288) +++ rs6000-nat.c (working copy) @@ -1036,7 +1036,8 @@ xcoff_relocate_symtab (unsigned int pid) int ldisize = arch64 ? sizeof (ldi->l64) : sizeof (ldi->l32); int size; - if (ptid_equal (inferior_ptid, null_ptid)) + /* Nothing to do if we are debugging a core file. */ + if (!target_has_execution) return; do --RASg3xLB4tUQ4RcS--