]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r225203 (partial)
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 7 May 2012 07:04:41 +0000 (07:04 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 7 May 2012 07:04:41 +0000 (07:04 +0000)
commit788323bc686ed0ecafa80a0aa02f8fbc6016f332
tree33f880fd6e98f032a853362b622dcae4526f37ff
parentf8d568e0a7fc8a25d84f866f476489a9fbfbcab4
MFC: r225203 (partial)

Attempt to make break-to-debugger and alternative break-to-debugger more
accessible:

(1) Always compile in support for breaking into the debugger if options
    KDB is present in the kernel.

(2) Disable both by default, but allow them to be enabled via tunables
    and sysctls debug.kdb.break_to_debugger and
    debug.kdb.alt_break_to_debugger.

(3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue
    to behave as before -- only now instead of compiling in
    break-to-debugger support, they change the default values of the
    above sysctls to enable those features by default.  Current kernel
    configurations should, therefore, continue to behave as expected.

(4) Migrate alternative break-to-debugger state machine logic out of
    individual device drivers into centralised KDB code.  This has a
    number of upsides, but also one downside: it's now tricky to release
    sio spin locks when entering the debugger, so we don't.  However,
    similar logic does not exist in other device drivers, including uart.

(5) dcons requires some special handling; unlike other console types, it
    allows overriding KDB's own debugger selection, so we need a new
    interface to KDB to allow that to work.

GENERIC kernels will now support break-to-debugger as long as appropriate
boot/run-time options are set, which should improve the debuggability of
kernels significantly.

MFC: r225214 (partial)

Follow up to r225203 refining break-to-debugger run-time configuration
improvements:

(1) Implement new model in previously missed at91 UART driver
(2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h
    to opt_kdb.h (spotted by np)
(3) Garbage collect now-unused opt_comconsole.h

git-svn-id: svn://svn.freebsd.org/base/stable/8@235121 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
14 files changed:
sys/arm/at91/uart_dev_at91usart.c
sys/conf/options
sys/ddb/db_break.c
sys/dev/cfe/cfe_console.c
sys/dev/dcons/dcons_os.c
sys/dev/ofw/ofw_console.c
sys/dev/sio/sio.c
sys/dev/syscons/syscons.c
sys/dev/uart/uart_core.c
sys/kern/subr_kdb.c
sys/modules/dcons/Makefile
sys/modules/sio/Makefile
sys/pc98/cbus/sio.c
sys/sys/kdb.h