This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Add hardware breapoints in procfs.c
> 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * procfs.c (procfs_insert_hw_breakpoint, procfs_remove_hw_breakpoint):
> New functions.
> (procfs_use_watchpoints): Register new hardware breakpoint related
> target functions.
I don't know procfs enough to review the patch accurately. I think
that the part for removing the watchpoint is correct, but I'm wondering
about the part that sets the watchpoint. Does it always stop before
the instruction gets executed? for instance, if you look at
procfs_insert_watchpoint, it does depend on the target:
if (!target_have_steppable_watchpoint
&& !gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
{
/* When a hardware watchpoint fires off the PC will be left at
the instruction following the one which caused the
watchpoint. It will *NOT* be necessary for GDB to step over
the watchpoint. */
return procfs_set_watchpoint (inferior_ptid, addr, len, type, 1);
}
else
{
/* When a hardware watchpoint fires off the PC will be left at
the instruction which caused the watchpoint. It will be
necessary for GDB to step over the watchpoint. */
return procfs_set_watchpoint (inferior_ptid, addr, len, type, 0);
}
Does it matter for h/w breakpoints?
--
Joel