From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28095 invoked by alias); 21 May 2006 14:14:38 -0000 Received: (qmail 28081 invoked by uid 22791); 21 May 2006 14:14:37 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp06.au.ibm.com (HELO ausmtp06.au.ibm.com) (202.81.18.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 21 May 2006 14:14:34 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp06.au.ibm.com (8.13.6/8.13.6) with ESMTP id k4LEGhV81548512 for ; Mon, 22 May 2006 00:16:45 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k4LEHenZ243066 for ; Mon, 22 May 2006 00:17:47 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k4LEEJ0q025859 for ; Mon, 22 May 2006 00:14:20 +1000 Received: from sig-9-65-126-160.mts.ibm.com (sig-9-65-126-160.mts.ibm.com [9.65.126.160]) by d23av04.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k4LEEFJL025833; Mon, 22 May 2006 00:14:17 +1000 Date: Mon, 22 May 2006 16:39:00 -0000 From: Wu Zhou To: Daniel Jacobowitz cc: gdb@sources.redhat.com Subject: Re: Some questions w.r.t remote watchpoint support in i386 In-Reply-To: <20060425125422.GB21293@nevyn.them.org> Message-ID: References: <20060425125422.GB21293@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00328.txt.bz2 > > 1. The first error I encounter is: "Couldn't write debug register: No such > > process". > > > > After some tracking, I found gdb client is calling target_insert_watchpoint > > defined in config/i386/nm-i386.h, instead of the remote_insert_watchpoint > > defined in remote.c > > > > I guess this is a more general problem. Whenever you change target under > > i386 platform, you will always get the i386_insert_watchpoint (and other > > three target operations) executed. > > > > Maybe we can put these target operation into the target_ops, instead of > > defining them as macro in config/i386/nm-i386.h? > > Yes, someone needs to fix this. I had a closer look at this. It seems this will involve quite a few gdb configs. Almost all the native header files in config/i386 include nm-i386.h, but their responsive native c source are very different. To delete these macros in nm-i386.h, I believe we need to put their counterpart target vectore into all these responsive native c source. And we also need to test that all relevant configs are ok after the changes. It seems hard to me. Anyone have any good idea? > > > 2. Following the above thought, I comment out these four macros in > > config/i386/nm-i386.h, and add them into i386-linux-nat.c > > > > This time, local gdb will call remote_insert_watchpoint indeed, but I get > > another error: > > > > Can't clear hardware watchpoints without the 'Z2' (write-watchpoint) packet. > > > > "set debug remote 1" tell me that Packet Z2 (write-watchpoint) is NOT > > supported > > > > I tried to use "set remote write-watchpoint-packet 1", but it won't work > > either: > > > > Enabled packet Z2 (write-watchpoint) not recognized by stub > > > > my question here is: > > > > What is the stub refered to here? Is it the gdbserver? And how can > > gdbserver determine which packat he will support, which won't? > > The stub is gdbserver, yes. It supports what it supports, and does not > support what no one has implemented! And no one has implemented i386 > watchpoints for gdbserver. It seems that there is not many requirement for this? Maybe i386 is not a very popular gdbserver platform. :-) Regards - Wu Zhou