This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA]: Modified Watchthreads Patch


> Date: Sat, 11 Dec 2004 11:36:52 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: eliz@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com
> 
> The kernel implementation of hardware watchpoints is very
> platform-dependent because the hardware implementation of hardware
> watchpoints is very platform-dependent.

??? Are we still talking about x86?  If so, there are only 2 possible
mechanisms I know about: (1) debug registers and (2) page-level
protection.  Are there any others?  Am I missing something?

Of these two, i386-nat.c currently only supports the first one.  If we
restrict ourselves for a moment to that single mechanism only, what
platform dependencies are we talking about, as far as the _hardware_
implementation of hardware-assisted watchpoints is concerned?  Am I
missing something?

> I would expect that they would always be
> per-thread on any Linux target with true hardware watchpoints.  Of
> course, they'll be process global if they're implemented by page
> protections

The implementation that uses debug registers can be either global or
local, depending on some bit in one of the registers.  One thing GDB
should know about a platform is how that platform fiddles with that
bit.


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