From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9890 invoked by alias); 16 Oct 2010 17:43:53 -0000 Received: (qmail 9769 invoked by uid 22791); 16 Oct 2010 17:43:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Oct 2010 17:43:47 +0000 Received: (qmail 12649 invoked from network); 16 Oct 2010 17:43:45 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Oct 2010 17:43:45 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops Date: Sat, 16 Oct 2010 17:43:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Thiago Jung Bauermann References: <1282074071.2606.702.camel@hactar> In-Reply-To: <1282074071.2606.702.camel@hactar> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010161843.43062.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: 2010-10/txt/msg00262.txt.bz2 On Tuesday 17 August 2010 20:41:11, Thiago Jung Bauermann wrote: > if (!mem_cnt) > - b->type = bp_watchpoint; > + { > + b->type = bp_watchpoint; > + > + /* When downgrading to a software watchpoint, we have to > + remember the value of the OPS field so that we can restore > + it when upgrading to a hardware watchpoint again. */ > + if (b->ops) > + { > + b->old_ops = b->ops; > + b->ops = NULL; > + } IMO, if you needed this juggling, something is wrong with the design. :-/ -- Pedro Alves