From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4052 invoked by alias); 15 Mar 2009 20:08:23 -0000 Received: (qmail 4042 invoked by uid 22791); 15 Mar 2009 20:08:22 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Mar 2009 20:08:17 +0000 Received: (qmail 32278 invoked from network); 15 Mar 2009 20:08:16 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Mar 2009 20:08:16 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [commit/AIX] Debugger is crashing when debugging program Date: Sun, 15 Mar 2009 20:33:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker References: <20090315194428.GA9576@adacore.com> In-Reply-To: <20090315194428.GA9576@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903151958.36564.pedro@codesourcery.com> X-IsSubscribed: yes 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/msg00242.txt.bz2 On Sunday 15 March 2009 19:44:28, Joel Brobecker wrote: > static int > aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid) > { > + struct target_ops *beneath = find_target_beneath (¤t_target); > + > if (!PD_TID (ptid)) > - return base_target.to_thread_alive (ops, ptid); > + return beneath->to_thread_alive (beneath, ptid); > > @@ -1698,9 +1693,10 @@ 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); 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. -- Pedro Alves