From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5303 invoked by alias); 22 Jun 2009 19:39:04 -0000 Received: (qmail 5295 invoked by uid 22791); 22 Jun 2009 19:39:03 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 19:38:54 +0000 Received: from Nebula.ott.qnx.com (nebula.ott.qnx.com [10.42.3.30]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id PAA31981; Mon, 22 Jun 2009 15:38:45 -0400 Received: from [127.0.0.1] ([10.42.100.129]) by Nebula.ott.qnx.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Jun 2009 15:38:51 -0400 Message-ID: <4A3FDDCA.2010106@qnx.com> Date: Mon, 22 Jun 2009 19:39:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Pedro Alves , Doug Evans Subject: Re: [patch] gdbserver: Add support for Z0/Z1 packets References: <4A3B98EC.70209@qnx.com> <200906202301.52782.pedro@codesourcery.com> In-Reply-To: <200906202301.52782.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00580.txt.bz2 Pedro Alves wrote: > On Friday 19 June 2009 14:55:56, Aleksandar Ristovski wrote: > >> RCS file: /cvs/src/src/gdb/gdbserver/target.h,v >> retrieving revision 1.36 >> diff -u -p -r1.36 target.h >> --- target.h 1 Apr 2009 22:50:24 -0000 1.36 >> +++ target.h 19 Jun 2009 13:47:44 -0000 >> @@ -213,6 +213,14 @@ struct target_ops >> int (*read_auxv) (CORE_ADDR offset, unsigned char *myaddr, >> unsigned int len); >> >> + /* Insert and remove breakpoint. Argument TYPE can be: >> + '0' = software-breakpoint >> + '1' = hardware-breakpoint > > ^ spurious space > >> + Returns 0 if successful, 1 otherwise. */ >> + >> + int (*insert_breakpoint) (char type, CORE_ADDR addr); >> + int (*remove_breakpoint) (char type, CORE_ADDR addr); > > 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). But either way is fine with me - just let me know. Thanks, -- Aleksandar Ristovski QNX Software Systems