This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA- v2] Remove CANNOT_STEP_HW_WATCHPOINTS related code (was fix for bug 11531)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'Eli Zaretskii'" <eliz at gnu dot org>, gdb-patches at sourceware dot org, "'Joel Brobecker'" <brobecker at adacore dot com>
- Date: Mon, 26 Apr 2010 12:55:59 +0100
- Subject: Re: [RFA- v2] Remove CANNOT_STEP_HW_WATCHPOINTS related code (was fix for bug 11531)
- References: <000301cae303$d6d068b0$84713a10$@muller@ics-cnrs.unistra.fr> <201004261226.38885.pedro@codesourcery.com> <005a01cae536$9ec66fc0$dc534f40$@muller@ics-cnrs.unistra.fr>
On Monday 26 April 2010 12:50:08, Pierre Muller wrote:
> > owner@sourceware.org] De la part de Pedro Alves
> > This is going in circles, but, why didn't you remove the macro
> > definition and the whole comment around it from the nm file?
>
> Done here,
Thanks.
> with configure.tgt part removed.
> The macro only appears in ChangeLog after this patch.
>
> What about that version?
>
> Pierre
>
> ChangeLog entry:
> 2010-04-26 Pierre Muller <muller@ics.u-strasbg.fr>
>
> PR breakpoints/11531.
> * config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Remove
> macro definition and related comment.
> * infrun.c (CANNOT_STEP_HW_WATCHPOINTS): Remove macro.
> (resume): Remove code and comment related to this macro.
This is okay, thanks.
>
> doc ChangeLog entry:
>
> 2010-04-26 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation
> of macro deleted from GDB code.
This is obvious, IMO.
>
> Index: config/i386/nm-i386sol2.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/i386/nm-i386sol2.h,v
> retrieving revision 1.19
> diff -u -p -r1.19 nm-i386sol2.h
> --- config/i386/nm-i386sol2.h 1 Jan 2010 07:31:48 -0000 1.19
> +++ config/i386/nm-i386sol2.h 26 Apr 2010 11:44:55 -0000
> @@ -19,14 +19,4 @@
>
> #ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
>
> -/* Solaris x86 2.6 and 2.7 targets have a kernel bug when stepping
> - over an instruction that causes a page fault without triggering
> - a hardware watchpoint. The kernel properly notices that it shouldn't
> - stop, because the hardware watchpoint is not triggered, but it forgets
> - the step request and continues the program normally.
> - Work around the problem by removing hardware watchpoints if a step is
> - requested, GDB will check for a hardware watchpoint trigger after the
> - step anyway. */
> -#define CANNOT_STEP_HW_WATCHPOINTS
> -
> #endif /* NEW_PROC_API */
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.435
> diff -u -p -r1.435 infrun.c
> --- infrun.c 25 Mar 2010 20:48:53 -0000 1.435
> +++ infrun.c 26 Apr 2010 11:44:52 -0000
> @@ -179,16 +179,6 @@ show_debug_infrun (struct ui_file *file,
> #endif
>
>
> -/* Convert the #defines into values. This is temporary until wfi control
> - flow is completely sorted out. */
> -
> -#ifndef CANNOT_STEP_HW_WATCHPOINTS
> -#define CANNOT_STEP_HW_WATCHPOINTS 0
> -#else
> -#undef CANNOT_STEP_HW_WATCHPOINTS
> -#define CANNOT_STEP_HW_WATCHPOINTS 1
> -#endif
> -
> /* Tables of how to react to signals; the user sets them. */
>
> static unsigned char *signal_stop;
> @@ -1484,18 +1474,6 @@ resume (int step, enum target_signal sig
> "trap_expected=%d\n",
> step, sig, tp->trap_expected);
>
> - /* Some targets (e.g. Solaris x86) have a kernel bug when stepping
> - over an instruction that causes a page fault without triggering
> - a hardware watchpoint. The kernel properly notices that it shouldn't
> - stop, because the hardware watchpoint is not triggered, but it forgets
> - the step request and continues the program normally.
> - Work around the problem by removing hardware watchpoints if a step is
> - requested, GDB will check for a hardware watchpoint trigger after the
> - step anyway. */
> - if (CANNOT_STEP_HW_WATCHPOINTS && step)
> - remove_hw_watchpoints ();
> -
> -
> /* Normally, by the time we reach `resume', the breakpoints are either
> removed or inserted, as appropriate. The exception is if we're
> sitting
> at a permanent breakpoint; we need to step over it, but permanent
> Index: doc/gdbint.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
> retrieving revision 1.321
> diff -u -p -r1.321 gdbint.texinfo
> --- doc/gdbint.texinfo 10 Mar 2010 18:20:07 -0000 1.321
> +++ doc/gdbint.texinfo 26 Apr 2010 11:44:55 -0000
> @@ -781,11 +781,6 @@ inferior after a watchpoint has been hit
> when watchpoints trigger at the instruction following an interesting
> read or write.
>
> -@findex CANNOT_STEP_HW_WATCHPOINTS
> -@item CANNOT_STEP_HW_WATCHPOINTS
> -If this is defined to a non-zero value, @value{GDBN} will remove all
> -watchpoints before stepping the inferior.
> -
> @findex STOPPED_BY_WATCHPOINT
> @item STOPPED_BY_WATCHPOINT (@var{wait_status})
> Return non-zero if stopped by a watchpoint. @var{wait_status} is of
>
>
--
Pedro Alves