This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: h/w watchpoint pointer initialization patch.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]