From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22072 invoked by alias); 25 Feb 2010 19:19:52 -0000 Received: (qmail 22055 invoked by uid 22791); 25 Feb 2010 19:19:51 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Thu, 25 Feb 2010 19:19:41 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1PJJWOI010790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Feb 2010 14:19:32 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1PJJUEC017298; Thu, 25 Feb 2010 14:19:30 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o1PJJTvh006791; Thu, 25 Feb 2010 14:19:29 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id F06A8378261; Thu, 25 Feb 2010 12:19:28 -0700 (MST) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFC: fix bug with std::terminate handler References: <201002251826.46359.pedro@codesourcery.com> Reply-To: Tom Tromey Date: Thu, 25 Feb 2010 19:19:00 -0000 In-Reply-To: <201002251826.46359.pedro@codesourcery.com> (Pedro Alves's message of "Thu, 25 Feb 2010 18:26:46 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-02/txt/msg00631.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Tom> call_function_by_hand installs a momentary breakpoint on std::terminate, Tom> and then deletes it later. However, this can cause a double deletion of Tom> the breakpoint. In the bug, the called function is dlopen, which causes Tom> gdb to enter solib_add, which calls breakpoint_re_set, deleting the Tom> momentary breakpoint. Pedro> Why doesn't stepping over "dlopen", with "(gdb) next" cause the Pedro> same problem with step-resume breakpoints? The step-resume breakpoints have type bp_step_resume, which are handled specially by breakpoint_re_set_one. The std::terminate breakpoint is just a plain bp_breakpoint. I suppose I could add a new bptype, though that seems rather heavy for this. If you have a particular approach you think would be best, I would be happy to implement that. Tom