summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_break.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-07-10 23:47:20 +0000
committermarcel <marcel@FreeBSD.org>2004-07-10 23:47:20 +0000
commitaae5483213805c645aad67985fa4f638d6e34915 (patch)
tree533bc344dcaf70d30b9a52c0dc5327488516647b /sys/ddb/db_break.c
parent1dca995d693b9df1e65a294b6385cc1d442233b1 (diff)
downloadFreeBSD-src-aae5483213805c645aad67985fa4f638d6e34915.zip
FreeBSD-src-aae5483213805c645aad67985fa4f638d6e34915.tar.gz
Mega update for the KDB framework: turn DDB into a KDB backend.
Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints.
Diffstat (limited to 'sys/ddb/db_break.c')
-rw-r--r--sys/ddb/db_break.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c
index 577e338..78f4f4f 100644
--- a/sys/ddb/db_break.c
+++ b/sys/ddb/db_break.c
@@ -367,46 +367,3 @@ db_map_addr(addr)
#endif
return kernel_map;
}
-
-#ifdef ALT_BREAK_TO_DEBUGGER
-/*
- * Solaris implements a new BREAK which is initiated by a character sequence
- * CR ~ ^b which is similar to a familiar pattern used on Sun servers by the
- * Remote Console.
- *
- * Note that this function may be called from almost anywhere, with interrupts
- * disabled and with unknown locks held, so it must not access data other than
- * its arguments. Its up to the caller to ensure that the state variable is
- * consistent.
- */
-
-#define KEY_CR 13 /* CR '\r' */
-#define KEY_TILDE 126 /* ~ */
-#define KEY_CRTLB 2 /* ^B */
-
-int
-db_alt_break(int data, int *state)
-{
- int brk = 0;
-
- switch (data) {
- case KEY_CR:
- *state = KEY_TILDE;
- break;
- case KEY_TILDE:
- if (*state == KEY_TILDE)
- *state = KEY_CRTLB;
- else
- *state = 0;
- break;
- case KEY_CRTLB:
- if (*state == KEY_CRTLB)
- brk = 1;
- /* FALLTHROUGH */
- default:
- *state = 0;
- break;
- }
- return (brk);
-}
-#endif
OpenPOWER on IntegriCloud