aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/kdb.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2011-08-26 21:46:36 +0000
committerRobert Watson <rwatson@FreeBSD.org>2011-08-26 21:46:36 +0000
commit4cf75455890c103c9a66cb791e88998aafd4f8ce (patch)
tree2ae73feb05cbeb7e5e297fdfc6fab07cf2db82b5 /sys/sys/kdb.h
parent3a3ba1b069d1b0f987e739845abbc100d548139e (diff)
downloadsrc-4cf75455890c103c9a66cb791e88998aafd4f8ce.tar.gz
src-4cf75455890c103c9a66cb791e88998aafd4f8ce.zip
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 in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz)
Notes
Notes: svn path=/head/; revision=225203
Diffstat (limited to 'sys/sys/kdb.h')
-rw-r--r--sys/sys/kdb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index 2982e03c75f1..61ee0973eb14 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -64,6 +64,8 @@ extern struct pcb *kdb_thrctx; /* Current context. */
extern struct thread *kdb_thread; /* Current thread. */
int kdb_alt_break(int, int *);
+int kdb_alt_break_gdb(int, int *);
+int kdb_break(void);
void kdb_backtrace(void);
int kdb_dbbe_select(const char *);
void kdb_enter(const char *, const char *);