From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29721 invoked by alias); 5 May 2011 10:28:30 -0000 Received: (qmail 29711 invoked by uid 22791); 5 May 2011 10:28:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 May 2011 10:28:13 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QHvmw-0003Ir-R4; Thu, 05 May 2011 06:28:06 -0400 Date: Thu, 05 May 2011 10:28:00 -0000 Message-Id: From: Eli Zaretskii To: Pedro Alves CC: bauerman@br.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com In-reply-to: <201105050915.18716.pedro@codesourcery.com> (message from Pedro Alves on Thu, 5 May 2011 09:15:18 +0100) Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint Reply-to: Eli Zaretskii References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <83d3jz4110.fsf@gnu.org> <1304547648.19357.230.camel@hactar> <201105050915.18716.pedro@codesourcery.com> 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: 2011-05/txt/msg00122.txt.bz2 > From: Pedro Alves > Date: Thu, 5 May 2011 09:15:18 +0100 > Cc: Eli Zaretskii , > gdb-patches@sourceware.org, > uweigand@de.ibm.com > > On Wednesday 04 May 2011 23:20:48, Thiago Jung Bauermann wrote: > > Pedro's suggestion: > > > > 1. The inferior is stopped and software bp_locations (both breakpoints > > and watchpoints) are removed. Hardware ones stay in place. > > 2. The user asks for a new watchpoint. > > 3. GDB evaluates the expression and creates the bp_locations. > > 4. GDB tries to insert the bp_locations as hw watches. If that fails, > > then converts to sw and registers the watchpoint for insertion. > > 5. The user asks the inferior to be continued. > > 6. GDB inserts sw breakpoints and watchpoints and resumes the inferior. > > Either that or try keep hardware breakpoints and watchpoints uninserted, > and insert them just before 4. If you really meant "before 4", then I must say I don't understand what are the 2 alternative suggestions.