From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9212 invoked by alias); 22 Jun 2009 22:46:00 -0000 Received: (qmail 9204 invoked by uid 22791); 22 Jun 2009 22:46:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 22:45:53 +0000 Received: (qmail 20250 invoked from network); 22 Jun 2009 22:45:51 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 22 Jun 2009 22:45:51 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] gdbserver: Add support for Z0/Z1 packets Date: Mon, 22 Jun 2009 22:46:00 -0000 User-Agent: KMail/1.9.10 Cc: Aleksandar Ristovski , Doug Evans References: <200906202301.52782.pedro@codesourcery.com> <4A3FDDCA.2010106@qnx.com> In-Reply-To: <4A3FDDCA.2010106@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906222346.54263.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: 2009-06/txt/msg00594.txt.bz2 On Monday 22 June 2009 20:38:50, Aleksandar Ristovski wrote: > > Z0 and Z1 breakpoints also take a 'len' argument, just > > like Z2-Z4. You should also pass those down. > > > > But, Let's take a step back --- why not just rename the > > insert_watchpoint|remove_watchpoint functions to insert_point,remove_point, > > and relax the type checks in server.c: > > That was my initial implementation, prior to proposing the > change. Then I looked at target ops in gdb; there we have > two different functions for breakpoint and watchpoint so I > followed that logic (even though the logic there seems to be > incomplete: there is a pair for hw and non-hw breakponts but > only one pair for watchpoints). That's because software watchpoints aren't "inserted". Instead, GDB forces the target to single-step all the way (see bpstat_should_step calls in infrun.c), and evaluates the watchpoints expressions for changes at each step. > But either way is fine with me - just let me know. I'd prefer the approach I suggested, and worry about splitting the breakpoints from watchpoints API if/when we actually need it. -- Pedro Alves