From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18387 invoked by alias); 24 Oct 2012 20:48:31 -0000 Received: (qmail 18379 invoked by uid 22791); 24 Oct 2012 20:48:31 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mms2.broadcom.com (HELO mms2.broadcom.com) (216.31.210.18) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Oct 2012 20:48:27 +0000 Received: from [10.9.200.133] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Wed, 24 Oct 2012 13:46:27 -0700 X-Server-Uuid: 4500596E-606A-40F9-852D-14843D8201B2 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP Server id 8.2.247.2; Wed, 24 Oct 2012 13:47:42 -0700 Received: from [10.177.252.140] (unknown [10.177.252.140]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id B714F40FE5; Wed, 24 Oct 2012 13:48:12 -0700 (PDT) Message-ID: <5088540F.3040200@broadcom.com> Date: Wed, 24 Oct 2012 20:48:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: "Jan Kratochvil" cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] improve python finish breakpoint for exceptions/longjmp case. References: <505C805A.1050400@broadcom.com> <20121011163241.GA9620@host2.jankratochvil.net> <507C7498.7040001@broadcom.com> <20121017162748.GA6546@host2.jankratochvil.net> In-Reply-To: <20121017162748.GA6546@host2.jankratochvil.net> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-10/txt/msg00484.txt.bz2 Jan, On 17/10/2012 5:27 PM, Jan Kratochvil wrote: > > [...] >> +#include >> +#include >> +#include >> + >> +static volatile int blocks[2]; >> + >> +void >> +breakpt (int is_first_thread) >> +{ >> + if (is_first_thread) >> + { >> + /* Main thread. */ >> + >> + blocks[0] = 1; /* Set thread 2 going. */ >> + while (!blocks[1]); /* Wait for thread 2. */ > > Also testcases should not remain hanging indefinitely if something breaks, in > this case 'alarm (60);' at the start of 'main' should ensure that I think. I'm confused why this test would need to take care of shutting itself down, if the test failed would dejagnu not timeout the test, and eventually gdb would exit taking down the inferior as it does? I had a look for other tests that used alarm() but there are only a few and I didn't think any of these were trying to perform a defensive shutdown as you're suggesting, so can you point at any other test that needs to do this sort of thing, or is there something special about this test? Thanks, Andrew