From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17029 invoked by alias); 15 Mar 2009 21:18:48 -0000 Received: (qmail 17020 invoked by uid 22791); 15 Mar 2009 21:18:47 -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 21:18:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8EA002BAB9A; Sun, 15 Mar 2009 17:18:41 -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 AuMNXBAQe-YO; Sun, 15 Mar 2009 17:18:41 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 429552BAB9E; Sun, 15 Mar 2009 17:07:47 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 15C3BF5C3F; Sun, 15 Mar 2009 14:07:46 -0700 (PDT) Date: Sun, 15 Mar 2009 23:46:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [commit/AIX] Debugger is crashing when debugging program Message-ID: <20090315210746.GC9294@adacore.com> References: <20090315194428.GA9576@adacore.com> <200903151958.36564.pedro@codesourcery.com> <20090315203742.GB9294@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20090315203742.GB9294@adacore.com> 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/msg00246.txt.bz2 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 604 > > I'm curious, why ¤t_target here instead of 'ops'? This will call > > aix_thread_thread_alive and aix_thread_pid_to_str two times, as > > current_target.beneath == aix_thread. > > !!! Typo. Will fix immediately. Fixed thusly. 2009-03-15 Joel Brobecker * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str): Use the ops parameter to get to the target beneath, rather than using the current_target global. Using the current_target global was an accident. Tested on powerpc-aix. Checked in. Thanks again, Pedro. -- Joel --BOKacYhQ+x31HxR3 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="aix-thread.diff" Content-length: 840 Index: aix-thread.c =================================================================== --- aix-thread.c (revision 146289) +++ aix-thread.c (working copy) @@ -1676,7 +1676,7 @@ aix_thread_mourn_inferior (struct target static int aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid) { - struct target_ops *beneath = find_target_beneath (¤t_target); + struct target_ops *beneath = find_target_beneath (ops); if (!PD_TID (ptid)) return beneath->to_thread_alive (beneath, ptid); @@ -1693,7 +1693,7 @@ static char * aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid) { static char *ret = NULL; - struct target_ops *beneath = find_target_beneath (¤t_target); + struct target_ops *beneath = find_target_beneath (ops); if (!PD_TID (ptid)) return beneath->to_pid_to_str (beneath, ptid); --BOKacYhQ+x31HxR3--