From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4307 invoked by alias); 15 Nov 2007 05:59:44 -0000 Received: (qmail 4299 invoked by uid 22791); 15 Nov 2007 05:59:43 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Nov 2007 05:59:40 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IsXlG-0001IT-4c for gdb-patches@sources.redhat.com; Thu, 15 Nov 2007 05:59:34 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2007 05:59:34 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2007 05:59:34 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: delete_breakpoint: don't try to insert other breakpoints Date: Thu, 15 Nov 2007 05:59:00 -0000 Message-ID: References: <200711142324.11319.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.4 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: 2007-11/txt/msg00296.txt.bz2 Eli Zaretskii wrote: >> From: Vladimir Prus >> Date: Wed, 14 Nov 2007 23:24:10 +0300 >> >> The delete_breakpoint function tries to check if the >> breakpoint being deleted is inserted in inferior, and if >> so, searched for breakpoints that are set at the same address >> and tries to insert them. However, GDB removes breakpoint >> from the inferior immediately when inferior is stopped, >> so this code will never run. > > I think you are assuming that this code does and will always run > synchronously. Is that a valid assumption? At the moment, I'm not aware of any way to invoke delete_breakpoint while existing breakpoints are inserted. Is there one? (In particular, "target async" does not seem to work at all). In future, this situation might be possible. However, in general I think it's better to start by making code clear while still working for current GDB, and then adjust it as needed for future GDB. In this particular case, a call to insert_breakpoints, together with some adjustments, would be much better for any future async code, as it won't duplicate code logic. - Volodya