summaryrefslogtreecommitdiffstats
path: root/sys/sys/kdb.h
Commit message (Collapse)AuthorAgeFilesLines
* Add constant missed in r244099alfred2012-12-101-0/+1
| | | | KDB entered due to KASSERT.
* - Extend the KDB interface to add a per-debugger callback to print ajhb2012-04-121-5/+9
| | | | | | | | | | | backtrace for an arbitrary thread (rather than the calling thread). A kdb_backtrace_thread() wrapper function uses the configured debugger if possible, otherwise it falls back to using stack(9) if that is available. - Replace a direct call to db_trace_thread() in propagate_priority() with a call to kdb_backtrace_thread() instead. MFC after: 1 week
* Attempt to make break-to-debugger and alternative break-to-debugger morerwatson2011-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Disconnect sun4v architecture from the three.attilio2011-05-141-1/+1
| | | | | | | | | Some files keep the SUN4V tags as a code reference, for the future, if any rewamped sun4v support wants to be added again. Reviewed by: marius Tested by: sbruno Approved by: re
* DTrace can enter the debugger from a probe. Add a WHY definition for this.jb2008-05-231-0/+1
|
* Expand kdb_alt_break a little, most commonly used with the optionpeter2008-05-041-0/+7
| | | | | | | | | | | | | | | | | | | ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons). We've used variations of this at work. The force panic sequence is best used with KDB_UNATTENDED for when you just want it to dump and get on with it. The reboot request is a safer way of getting into single user than a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc). It gives init the reboot signal, which causes an orderly reboot. I've taken my best guess at what the !x86 and non-sio code changes should be. This also makes sio release its spinlock before calling KDB/DDB.
* Add a new 'why' argument to kdb_enter(), and a set of constants to userwatson2007-12-251-1/+28
| | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
* Don't enter the debugger if KDB_UNATTENDED is set or ifps2005-04-201-0/+1
| | | | | | debug.debugger_on_panic=0. MFC after: 2 weeks
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Add kdb_thr_from_pid(), which given a PID returns the first threadmarcel2004-07-211-1/+2
| | | | in the process. This is useful when working from or with a process.
* Make kdb_dbbe_select() available as an interface function. This allowsmarcel2004-07-121-0/+1
| | | | | | changing the backend from outside the KDB frontend. For example from within a backend. Rewrite kdb_sysctl_current to make use of this function as well.
* Introduce the KDB debugger frontend. The frontend provides a frameworkmarcel2004-07-101-0/+78
in which multiple (presumably different) debugger backends can be configured and which provides basic services to those backends. Besides providing services to backends, it also serves as the single point of contact for any and all code that wants to make use of the debugger functions, such as entering the debugger or handling of the alternate break sequence. For this purpose, the frontend has been made non-optional. All debugger requests are forwarded or handed over to the current backend, if applicable. Selection of the current backend is done by the debug.kdb.current sysctl. A list of configured backends can be obtained with the debug.kdb.available sysctl. One can enter the debugger by writing to the debug.kdb.enter sysctl.
OpenPOWER on IntegriCloud