This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: h/w watchpoint pointer initialization patch.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jitendra Pawar <jitendra at linsyssoft dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 22 Jan 2006 15:22:14 -0500
- Subject: Re: h/w watchpoint pointer initialization patch.
- References: <1137490473.3508.33.camel@chanakya.linsyssoft.com>
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 <host_arch>_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