From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9387 invoked by alias); 5 May 2011 03:09:00 -0000 Received: (qmail 9374 invoked by uid 22791); 5 May 2011 03:08:58 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 May 2011 03:08:43 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LKP00300CN1XL00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Thu, 05 May 2011 06:08:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.234.175]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKP003Y2CQDXJ00@a-mtaout23.012.net.il>; Thu, 05 May 2011 06:08:38 +0300 (IDT) Date: Thu, 05 May 2011 03:09:00 -0000 From: Eli Zaretskii Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint In-reply-to: <1304547648.19357.230.camel@hactar> To: Thiago Jung Bauermann Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, uweigand@de.ibm.com Reply-to: Eli Zaretskii Message-id: <83liyln8sq.fsf@gnu.org> References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <201105031841.46949.pedro@codesourcery.com> <83hb9b4q80.fsf@gnu.org> <201105031912.43042.pedro@codesourcery.com> <83fwov4jem.fsf@gnu.org> <1304467386.19357.4.camel@hactar> <83d3jz4110.fsf@gnu.org> <1304547648.19357.230.camel@hactar> 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/msg00120.txt.bz2 > From: Thiago Jung Bauermann > Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, uweigand@de.ibm.com > Date: Wed, 04 May 2011 19:20:48 -0300 > > Current scheme: > > 1. The inferior is stopped and all bp_locations are removed. > 2. The user asks for a new watchpoint. > 3. GDB evaluates the expression and creates the bp_locations. > 4. GDB counts all existing watchpoint bp_locations and asks the target > whether there's room for one more. Depending on the answer, decides > for a hw or sw watch. > 5. GDB registers the new watchpoint for insertion. > 6. The user asks the inferior to be continued. > 7. GDB inserts all breakpoints and watchpoints and resumes the inferior. Yes. > 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. That's my understanding, yes.