From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9410 invoked by alias); 5 Mar 2014 18:56:36 -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 9398 invoked by uid 89); 5 Mar 2014 18:56:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 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; Wed, 05 Mar 2014 18:56:35 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s25IuSSi027622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Mar 2014 13:56:32 -0500 Received: from barimba (ovpn-113-183.phx2.redhat.com [10.3.113.183]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s25IU42f026364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 5 Mar 2014 13:30:09 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org, Joel Brobecker 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> <5314AFEA.8020705@redhat.com> <87y50q9h3e.fsf@fleche.redhat.com> <531644AE.1070404@redhat.com> <53166C73.2070308@redhat.com> Date: Wed, 05 Mar 2014 18:56:00 -0000 In-Reply-To: <53166C73.2070308@redhat.com> (Pedro Alves's message of "Wed, 05 Mar 2014 00:14:43 +0000") Message-ID: <87txbc7b2s.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-03/txt/msg00136.txt.bz2 Pedro> Confirmed, building with expat makes threaded debugging work: ... Pedro> (You can find an expat build at ~palves:/home/palves/opt/) Thanks. With this I was able to verify that your theory about the AIX to_attach method was correct -- I could make my patched gdb crash by debugging a multi-threaded inferior and then "attach"ing to a new process. The patch to aix-thread is pretty simple. It regression tests reasonably well, but not perfectly... the test suite on AIX provokes a number of internal errors, and with my patch they can be reported against different tests. I suspect this is timing sensitive though, perhaps latent races in the existing code, as the internal errors in question are all preceded by a failing call to aix-thread.c:ptrace_check. For example: (gdb) next thread_function (arg=0x0) at ../../../gdb/gdb/testsuite/gdb.threads/pending-step .c:57 57 (*myp) ++; /* insert breakpoint here */ aix-thread: ptrace (50, 38011047) returned -1 (errno = 22 Invalid argument) (gdb) next ../../gdb/gdb/breakpoint.c:15064: internal-error: insert_single_step_breakpoint: Assertion `single_step_breakpoints[1] == NULL' failed. I wonder whether this is good enough. Tom