From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1231 invoked by alias); 16 Nov 2011 19:04:54 -0000 Received: (qmail 1011 invoked by uid 22791); 16 Nov 2011 19:04:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Nov 2011 19:03:31 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RQkle-0006Kg-QM from pedro_alves@mentor.com for gdb-patches@sourceware.org; Wed, 16 Nov 2011 11:03:31 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 16 Nov 2011 19:03:28 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 1/5] Call update_global_location_list conditionally in install_breakpoint Date: Wed, 16 Nov 2011 19:04:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: Yao Qi References: <4EC20E2E.6010402@codesourcery.com> <4EC214F0.4070104@codesourcery.com> In-Reply-To: <4EC214F0.4070104@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111161903.27169.pedro@codesourcery.com> 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-11/txt/msg00443.txt.bz2 On Tuesday 15 November 2011 07:29:52, Yao Qi wrote: > During `pending tracepoint' work, we find install_breakpoint calls > update_global_location_list(1), which may throw error, and we have (at > the end of create_break() ): > > /* That's it. Discard the cleanups for data inserted into the > breakpoint. */ > discard_cleanups (bkpt_chain); > /* But cleanup everything else. */ > do_cleanups (old_chain); > > /* error call may happen here - have BKPT_CHAIN already discarded. */ > update_global_location_list (1); > > return 1; > > So, we should make sure that install_breakpoint called in > create_breakpoint doesn't call update_global_location_list(1), so that > update_global_location_list can be deferred to call at the end of > create_breakpoint. > > In this patch, we add a new parameter to determine to call > update_global_location_list. We pass 0 to install_breakpoint when it is > used in create_breakpoint and its callee. Okay. > * ada-lang.c (create_ada_exception_catchpoint): > * breakpoint.c (install_breakpoint): Add one more parameter so that > update_global_location_list is called conditionally. > (create_fork_vfork_event_catchpoint): Update. > (create_syscall_event_catchpoint): Update. > (create_breakpoint_sal): Update. > (create_breakpoint_sal): Update. Call do_cleanups before > install_breakpoint. > * breakpoint.h (install_breakpoint): Update declaration. -- Pedro Alves