From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26084 invoked by alias); 16 Jul 2010 15:58:08 -0000 Received: (qmail 26076 invoked by uid 22791); 16 Jul 2010 15:58:07 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 15:58:03 +0000 Received: (qmail 22780 invoked from network); 16 Jul 2010 15:58:01 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Jul 2010 15:58:01 -0000 Date: Fri, 16 Jul 2010 15:58:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: Thiago Jung Bauermann , gdb@sourceware.org Subject: Re: GDB hangs with simple multi-threaded program on linux Message-ID: <20100716155754.GA6315@caradoc.them.org> Mail-Followup-To: Tom Tromey , Thiago Jung Bauermann , gdb@sourceware.org References: <1279208729.14577.21.camel@hactar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00056.txt.bz2 On Thu, Jul 15, 2010 at 12:44:32PM -0600, Tom Tromey wrote: > The approach in this patch seems to be racy. Roland says we can do > better if we enable exit tracing. I see this in linux-nat.c: > > /* Do not enable PTRACE_O_TRACEEXIT until GDB is more prepared to support > read-only process state. */ > > I wonder what that means :-) I meant to use this for "catch exit". But once you reach PTRACE_O_TRACEEXIT, the process is in a pretty unique state. For instance, you can't call a function - if you do, the process will exit as soon as you resume it! -- Daniel Jacobowitz CodeSourcery