Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jul 2001 05:36:36 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Brian Dean <bsd@bsdhome.com>
Cc:        freebsd-audit@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: kernel ddb patch for setting hardware watchpoints
Message-ID:  <3B41BC54.309D58F2@mindspring.com>
References:  <20010630172522.A64393@neutrino.bsdhome.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Dean wrote:
> Caveats: This patch won't do the right thing on SMP systems.  The
>          debug registers are set/cleared only for the CPU running ddb.
>          Since the debug registers are a per-cpu thing, they won't be
>          set for the other CPUs.  I'll work on that next.

FWIW: When you enter into the debugger on an SMP system,
it holds all processors other than the boot processor;
it restarts them on exit.

This means that in single step mode, you will need to
ensure that the BP has the registers set.  It also means
that you probably are going to have a tough time with
the signalling in the MP case, where the modification
hits on an AP, since an AP can't drop into the debugger.

This may not be true in 5.x any more, but in 4.3, you
should look at the mp debugger code in /sys/i386/i386.

Probably, you will want to take the watchpoint, and then
IPI the boot processor, similar to the way a CTRL-ALT-ESC
does things (only using an IPI).

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B41BC54.309D58F2>