From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4595 invoked by alias); 26 Aug 2011 10:14:33 -0000 Received: (qmail 4587 invoked by uid 22791); 26 Aug 2011 10:14:32 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Aug 2011 10:14:13 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7QAE4IU010927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Aug 2011 06:14:05 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7QAE1S2006937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Aug 2011 06:14:04 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p7QAE0lB028064; Fri, 26 Aug 2011 12:14:00 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p7QADxEQ028063; Fri, 26 Aug 2011 12:13:59 +0200 Date: Fri, 26 Aug 2011 10:14:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch 2/2] Do not bpstat_clear_actions on throw_exception #3 Message-ID: <20110826101359.GA27121@host1.jankratochvil.net> References: <20110822145150.GB11817@host1.jankratochvil.net> <201108221806.15757.pedro@codesourcery.com> <20110823203257.GA4325@host1.jankratochvil.net> <201108241119.03993.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201108241119.03993.pedro@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-08/txt/msg00480.txt.bz2 On Wed, 24 Aug 2011 12:19:03 +0200, Pedro Alves wrote: > On Tuesday 23 August 2011 21:32:58, Jan Kratochvil wrote: > > Testing is more difficult, going to post now patch 3/2 but in fact the real > > continuation is not tested there as the testcase gets caught by > > execute_command. I haven't done a proper testcase for the async mode. > > I think a hook-stop that errors would be sufficient to leave > breakpoint commands dangling (normal_stop is called after > handle_inferior_event, from fetch_inferior_event) The problem is from hook-stop one runs execute_command which already catches the error and does bpstat_clear_actions on its own. Just FYI, it would be better but not everything needs to have a testcase. I started this thread to support entry-values-not-available implemented via an exception. It may even have been inspired by your NOT_AVAILABLE_ERROR. When evaluating all TRY_CATCH cases where should be done bpstat_clear_actions and where not I have found it is very subjective. gdb_target_find_new_threads for example may catch exception due to corrupted thread list when analysing a core file, therefore it currently does bpstat_clear_actions. But maybe it was expected the thread list is corrupted (it may have been the reason a core file got dumped). bpstat_clear_actions is not so strong as script_from_file abort but I find it similar and maybe confusing their conditions are not the same. I find wrong that `gdb -nx -x ./cmd' stops on first error as I have to run `gdb -nx cmd <