Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@wins.uva.nl>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb@sources.redhat.com
Subject: Re: [RFC] Unified watchpoints for x86 platforms
Date: Tue, 27 Feb 2001 03:28:00 -0000	[thread overview]
Message-ID: <s3id7c4e55g.fsf@debye.wins.uva.nl> (raw)
In-Reply-To: <200102241814.NAA00148@indy.delorie.com>

Eli Zaretskii <eliz@delorie.com> writes:

> While writing the code for the x86 watchpoint support, a question
> popped up regarding the Global Enable and Local Enable flags in the
> DR7 (Debug Control) register.
> 
> For those who might not remember what those flags are: Each
> hardware-assisted breakpoint or watchpoint should be enabled by
> setting bits in the DR7 register.  A watchpoint can be enabled locally
> or globally, depending on which bit in DR7 is set for that watchpoint.
> A watchpoint that is enabled locally will only break if it is hit in
> the current task.  A watchpoint that is enabled globally will break in
> any task.

Makes me wonder if global watchpoints would really work if hardware
task switching isn't used.

Anyway, I guess most x86 OS'es wouldn't allow any real global
watchpoints.  For Linux it doesn't matter whether you set the local or
the global bit.

> Now, I understand that, by and large, x86 platforms enable watchpoints
> locally, to avoid spurious traps triggered by other processes.  If
> that is true, should the code I write use the Local Enable flag
> unconditionally?  Or perhaps it would be useful to define an API that
> enables a target to control whether the global or local enable flag is
> used?

In principle a GDB command to control whether to enable watchpoints
locally or globally wouldn't be a bad idea.  But I don't know any
targets where this would be useful.  So if it isn't useful for DJGPP
either, I wouldn't bother.  A comment about the issue at the right
spot would be nice though.

Mark


  reply	other threads:[~2001-02-27  3:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200009070855.EAA00749@albacore>
     [not found] ` <200009071500.LAA07756@indy.delorie.com>
     [not found]   ` <200009081529.e88FTjx15960@debye.wins.uva.nl>
2001-02-10  7:34     ` Eli Zaretskii
2001-02-10 10:19       ` H . J . Lu
2001-02-10 11:28         ` Eli Zaretskii
2001-02-15  3:48       ` Eli Zaretskii
2001-02-15  8:17         ` Mark Kettenis
2001-02-15  9:32           ` Eli Zaretskii
2001-02-15 10:33             ` Mark Kettenis
2001-02-15 13:26               ` Eli Zaretskii
2001-02-15 10:41           ` Kevin Buettner
2001-02-15 13:26             ` Eli Zaretskii
2001-02-15 14:46               ` J.T. Conklin
2001-02-15 16:11                 ` Kevin Buettner
2001-02-15 23:29                   ` Eli Zaretskii
2001-02-24 10:14                   ` Eli Zaretskii
2001-02-27  3:28                     ` Mark Kettenis [this message]
2001-02-27 10:57                       ` Eli Zaretskii
2001-03-21 15:59                       ` [RFA] " Eli Zaretskii
2001-02-15 23:30                 ` [RFC] " Eli Zaretskii
     [not found]                   ` <eliz@delorie.com>
2001-02-16  0:45                     ` Kevin Buettner
2001-02-16 10:52                   ` J.T. Conklin
2001-02-16  0:00                 ` Mark Kettenis
2001-02-15  9:08         ` H . J . Lu

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=s3id7c4e55g.fsf@debye.wins.uva.nl \
    --to=kettenis@wins.uva.nl \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    /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