public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: "'Eli Zaretskii'" <eliz@gnu.org>,
	 gdb-patches@sourceware.org,
	 "'Joel Brobecker'" <brobecker@adacore.com>
Subject: Re: [RFA- v2] Remove CANNOT_STEP_HW_WATCHPOINTS related code (was fix for bug 11531)
Date: Mon, 26 Apr 2010 11:56:00 -0000	[thread overview]
Message-ID: <201004261255.59996.pedro@codesourcery.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2010-04-26 11:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 16:41 [RFA] Testcase for bug report 11531 Pierre Muller
2010-04-23 17:29 ` Joel Brobecker
2010-04-23 18:16   ` Pedro Alves
2010-04-23 18:25     ` Joel Brobecker
2010-04-24 15:13     ` [RFA- v2] Testcase for bug report 11531 and fix for Solaris Pierre Muller
2010-04-25 13:20       ` Joel Brobecker
2010-04-26 11:24         ` [RFA- v3] " Pierre Muller
2010-04-26 16:49           ` Joel Brobecker
2010-04-26 20:50             ` Pierre Muller
2010-04-25 20:10       ` [RFA- v2] " Pedro Alves
2010-04-26 10:55         ` [RFA- v2] Remove CANNOT_STEP_HW_WATCHPOINTS related code (was fix for bug 11531) Pierre Muller
2010-04-26 11:26           ` Pedro Alves
2010-04-26 11:50             ` Pierre Muller
2010-04-26 11:56               ` Pedro Alves [this message]
2010-04-26 12:03                 ` Pierre Muller
2010-04-26 11:29           ` Mark Kettenis
2010-04-26 11:52             ` Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004261255.59996.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).