From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28510 invoked by alias); 24 Jun 2009 17:56:00 -0000 Received: (qmail 28498 invoked by uid 22791); 24 Jun 2009 17:56:00 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout7.012.net.il (HELO mtaout7.012.net.il) (84.95.2.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Jun 2009 17:55:52 +0000 Received: from conversion-daemon.i-mtaout7.012.net.il by i-mtaout7.012.net.il (HyperSendmail v2007.08) id <0KLR008008GJGU00@i-mtaout7.012.net.il> for gdb@sources.redhat.com; Wed, 24 Jun 2009 20:55:49 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.213.34]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KLR00HU88H0D350@i-mtaout7.012.net.il>; Wed, 24 Jun 2009 20:55:49 +0300 (IDT) Date: Wed, 24 Jun 2009 17:56:00 -0000 From: Eli Zaretskii Subject: Re: Reporting 'out of hardware breakpoints' situation In-reply-to: <20090624174653.GA12412@caradoc.them.org> To: Daniel Jacobowitz Cc: ddaney@caviumnetworks.com, vladimir@codesourcery.com, gdb@sources.redhat.com Reply-to: Eli Zaretskii Message-id: <83fxdpbjoa.fsf@gnu.org> References: <200906241558.23737.vladimir@codesourcery.com> <4A4263F1.6060209@caviumnetworks.com> <20090624174653.GA12412@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00226.txt.bz2 > Date: Wed, 24 Jun 2009 13:46:54 -0400 > From: Daniel Jacobowitz > Cc: Vladimir Prus , gdb@sources.redhat.com > > So figuring out how many breakpoints are available is pretty > complex. I think it's pretty much impossible. (We have a similar problem with hardware watchpoints.) Several breakpoints can be set to the same address, in which case a single register can serve all of them, but deciding that this is the case is tricky at best. I think the way of throwing an exception and then handling it to revert to the original state is much more promising.