From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14255 invoked by alias); 3 Mar 2006 21:44:04 -0000 Received: (qmail 14247 invoked by uid 22791); 3 Mar 2006 21:44:04 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 03 Mar 2006 21:44:02 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FFI47-0005Rs-8s for gdb-patches@sourceware.org; Fri, 03 Mar 2006 16:43:59 -0500 Date: Fri, 03 Mar 2006 22:10:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: Save the length of inserted breakpoints Message-ID: <20060303214359.GA20872@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20060302221711.GB18830@nevyn.them.org> <200603022301.k22N1qEt008208@elgar.sibelius.xs4all.nl> <20060303141123.GA8069@nevyn.them.org> <20060303175407.GA14450@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00085.txt.bz2 On Fri, Mar 03, 2006 at 11:39:30PM +0200, Eli Zaretskii wrote: > > Date: Fri, 3 Mar 2006 12:54:07 -0500 > > From: Daniel Jacobowitz > > Cc: gdb-patches@sourceware.org > > > > If every target cached the size of inserted breakpoints and made sure > > to remove them at the same size, that would work too, but right now > > most targets don't need to remember anything about the breakpoints > > they've inserted; the common layer of GDB handles it. > > That sounds like an unfortunate design. If we are to make significant > changes to handle the complications that led you to this patch, > perhaps we should consider changing the design instead. Well, as I said, I was trying to not redesign more of GDB than necessary... Do you believe it _should_ be the target vector's responsibility to remember inserted breakpoint details? I find this a little bit strange, since every target will have to do just about the same thing. Another possible interface change to solve the problem would be to pass a "struct breakpoint" to the remove function. However, today there are many places where breakpoints are used without a corresponding "struct breakpoint" e.g. for software single step. I've tried cleaning up that in the past, and it's defeated me every single time. -- Daniel Jacobowitz CodeSourcery