From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27596 invoked by alias); 22 Jan 2006 20:22:19 -0000 Received: (qmail 27588 invoked by uid 22791); 22 Jan 2006 20:22:19 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 22 Jan 2006 20:22:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F0lj4-0007YM-I4; Sun, 22 Jan 2006 15:22:14 -0500 Date: Sun, 22 Jan 2006 20:22:00 -0000 From: Daniel Jacobowitz To: Jitendra Pawar Cc: gdb-patches@sources.redhat.com Subject: Re: h/w watchpoint pointer initialization patch. Message-ID: <20060122202214.GA27224@nevyn.them.org> Mail-Followup-To: Jitendra Pawar , gdb-patches@sources.redhat.com References: <1137490473.3508.33.camel@chanakya.linsyssoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1137490473.3508.33.camel@chanakya.linsyssoft.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00303.txt.bz2 On Tue, Jan 17, 2006 at 03:04:33PM +0530, Jitendra Pawar wrote: > Hi All, > While debugging cvs gdb, I put a h/w watch point, when this watch point > hits gdb calls target_insert_watchpoint macro. This macro defination is > present in target.h as bellow: > > #define target_insert_watchpoint(addr, len, type) \ > (*current_target.to_insert_watchpoint) (addr, len, type) > > In case of remote debugging *current_target.to_insert_watchpoint points > to remote_target_insert_watchpoint function, but while native debugging > it should points to _insert_watchpoint (e.g. > i386_insert_watchpoint) instead it points to return_minus_one function. > > This patch removes declaration of macros in file gdb/config/i386/nm- > i386.h for insertion and removal of h/w watchpoints. Instead it > initializes register access methods in gdb/i386-linux-nat.c file. > That fixes the above problem. I can't understand your explanation - what went wrong? Why? If you're running a native i386-linux GDB, then nm-i386.h should have been included before target.h, and the right function should have been called. Do you mean it the other way round, i.e. that you needed this patch for watchpoints to work when remote debugging? In which case something like this is definitely necessary; but the patch can't be right because Linux isn't the only i386 target using nm-i386.h. They all need to be converted together. -- Daniel Jacobowitz CodeSourcery