From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 494 invoked by alias); 30 Sep 2002 16:59:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 474 invoked from network); 30 Sep 2002 16:59:57 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 30 Sep 2002 16:59:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A362A3CB7; Mon, 30 Sep 2002 12:59:57 -0400 (EDT) Message-ID: <3D98830D.2070401@redhat.com> Date: Mon, 30 Sep 2002 09:59:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc;rfa:breakpoint] Pass full breakpoint/watchpoint count to target References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00765.txt.bz2 > On Sun, 29 Sep 2002, Andrew Cagney wrote: > > >> The attached patch changes the target vector so that a count of each >> type of hardware watchpoint/breakpoint is passed to the >> target_can_use_hardware_breakpoints() function. (Anyone got a better >> name for the function?). >> >> This lets targets make a better guess at how many watchpoints are going >> to be needed. > > > Sorry, I don't see the large-scale picture: how will this facility be > used in routine GDB operations by the application-level GDB code? > > Also, on a i386, for example, if you don't pass the size and alignment of > each address to be watched, the guess of the amount of required resources > can be very wrong. This is even more exacerbated due to debug register > sharing implemented for i386. Yes, see my reply to the other e-mail. I think we can do slightly better with the current model. However, to make things optimal we'll need to totally overhaul things. >> The intent is for the Z? packet to pass these totals down >> to the target. > > > Do you mean to say this is only for remote targets? Other architectures can use the info. Its just that remote will be first. Andrew