From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4296 invoked by alias); 4 Mar 2006 14:43:34 -0000 Received: (qmail 4286 invoked by uid 22791); 4 Mar 2006 14:43:33 -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; Sat, 04 Mar 2006 14:43:32 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FFXyk-0005JD-RD for gdb-patches@sourceware.org; Sat, 04 Mar 2006 09:43:30 -0500 Date: Sat, 04 Mar 2006 14:58:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: Save the length of inserted breakpoints Message-ID: <20060304144330.GA20187@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <200603022301.k22N1qEt008208@elgar.sibelius.xs4all.nl> <20060303141123.GA8069@nevyn.them.org> <20060303175407.GA14450@nevyn.them.org> <20060303214359.GA20872@nevyn.them.org> <20060303221003.GA21606@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/msg00096.txt.bz2 On Sat, Mar 04, 2006 at 11:23:04AM +0200, Eli Zaretskii wrote: > > Date: Fri, 3 Mar 2006 17:10:03 -0500 > > From: Daniel Jacobowitz > > > > For the record, it is not a target with peculiarities. It's an > > architecture with a feature > > I don't see the difference. One man's feature is another's > peculiarity. My real point was that it's not a target but an architecture. > > There's a division in GDB between the target, which is a method of > > communication et cetera ("how"), and the architecture, which describes > > "what" is being debugged. > > Btw, is this division described anywhere? Yes, extensively, in gdbint. > > The architecture says "the breakpoint at 0x8000 should be 2 bytes > > long". The target sets the breakpoint. The target goes to remove the > > breakpoint, and needs to know how long it was when it was set. > > If the issue at hand is just between the architecture and the target, > then why you had to touch breakpoint.[ch] in your patch? AFAIK, > breakpoint.c belongs to the higher-level GDB layer, above both the > target and the architecture, isn't that so? Targets and architectures try to be completely independent from each other. The core of GDB uses targets, and uses architectures (and they use each other, but to a lesser degree, and through the architecture and target vector abstractions). The architecture doesn't call target_remove_breakpoint, so if we want to pass more information from one to the other, it has to go through breakpoint.c. Anyway, the horse is dead! Mark didn't like the patch, and had some suggestions. You didn't like the patch either. I'll find another way. It will probably be an even larger diff. The CPSR support is turning out to be a remarkable pain for such a simple change. -- Daniel Jacobowitz CodeSourcery