From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31999 invoked by alias); 3 Mar 2014 16:38:11 -0000 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 Received: (qmail 31989 invoked by uid 89); 3 Mar 2014 16:38:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Mar 2014 16:38:10 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s23Gc8tr023453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 3 Mar 2014 11:38:08 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s23Gc3Kx017873; Mon, 3 Mar 2014 11:38:03 -0500 Message-ID: <5314AFEA.8020705@redhat.com> Date: Mon, 03 Mar 2014 16:38:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [RFC v2] fix regressions with target-async References: <1393609699-26407-1-git-send-email-tromey@redhat.com> <5310D2F9.2090507@redhat.com> <87mwh7cks4.fsf@fleche.redhat.com> In-Reply-To: <87mwh7cks4.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-03/txt/msg00046.txt.bz2 On 03/03/2014 04:24 PM, Tom Tromey wrote: > Pedro> But this looks bogus to me -- it's only reachable if you already > Pedro> have the target pushed because you're debugging a threaded core, > Pedro> and then do "attach"... > > FWIW, gdb doesn't recognize multi-threaded core files on the AIX machine > to which I have access. It seems that perhaps it is intended to work, > but neither my branch nor the gdb 7.6 installed on that machine do in > fact work. I was wrong on how this was supposedly reachable. No need for cores. Does multi-threading support work when debugging live programs? Looks like the target pushes itself from the new_objfile observer: static void new_objfile (struct objfile *objfile) { if (objfile) pd_enable (); else pd_disable (); } Say, as a result of "file ...". So it seems like that would end up pushing the target even before we had execution. Then later, an "attach" actually activates thread debugging (with pd_activate). linux-thread-db.c has: /* Don't attempt to use thread_db on executables not running yet. */ if (!target_has_registers) return 0; and attempts activation from the inferior_created observer. It seems to me aix-thread.c should be adjusted to do the same. -- Pedro Alves