From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1011 invoked by alias); 3 May 2011 16:57:12 -0000 Received: (qmail 995 invoked by uid 22791); 3 May 2011 16:57:10 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 May 2011 16:56:54 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LKM00000PNGAB00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Tue, 03 May 2011 19:55:53 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.185.101]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKM00MNYPOYOL90@a-mtaout22.012.net.il>; Tue, 03 May 2011 19:55:47 +0300 (IDT) Date: Tue, 03 May 2011 16:57:00 -0000 From: Eli Zaretskii Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint In-reply-to: <201105031058.44489.pedro@codesourcery.com> To: Pedro Alves Cc: gdb-patches@sourceware.org, bauerman@br.ibm.com, uweigand@de.ibm.com Reply-to: Eli Zaretskii Message-id: <83iptr4tba.fsf@gnu.org> References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <1304398546.2245.80.camel@hactar> <201105031058.44489.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/msg00068.txt.bz2 > From: Pedro Alves > Date: Tue, 3 May 2011 10:58:44 +0100 > Cc: Thiago Jung Bauermann , > uweigand@de.ibm.com > > What if we tried to make GDB do that instead? (try inserting > watchpoint immediately, instead of trying to do any sort of > accounting.) That could work, but won't it get us in trouble, e.g., when there are other threads running? They could inadvertently hit those watchpoints while we are trying to insert them, no? Or we could let targets which needs that (e.g., those using jtag as you described) try inserting the watchpoints to respond to GDB's request in target_can_use_hardware_watchpoint. Other targets, which can decide that without inserting, would not need to do that. WDYT?