Bug 191607 - Inconsistent documentation on entering the debugger
Summary: Inconsistent documentation on entering the debugger
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks: 231027
  Show dependency treegraph
 
Reported: 2014-07-04 14:38 UTC by Ed Maste
Modified: 2023-07-29 06:01 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2014-07-04 14:38:22 UTC
In the handbook (http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-online-ddb.html):

> There is an option available for serial consoles that allows the use of a serial line BREAK on the console line to enter DDB (options BREAK_TO_DEBUGGER in the kernel config file).

This option has been modified to control the default value of the 
debug.kdb.break_to_debugger tunable, which controls both serial and video console debugger behaviour.

ddb(4) may benefit from a mention

kernel config NOTES files have incorrect information (jmg@ is looking at that)
Comment 1 Benedict Reuschling freebsd_committer freebsd_triage 2015-06-15 20:35:14 UTC
Hi Ed, 

thanks for filing the report. I'd love to see more activity from developers on "their" handbook. ;) I've re-categorized it as a documentation bug.
Could you provide a writeup (doesn't have to be in XML, we doc folks can do that) for the changes you're proposing? You can also send us a review on Phabricator if that is easier for you.

Cheers

Benedict
Comment 2 Ed Maste freebsd_committer freebsd_triage 2015-06-15 20:43:27 UTC
Hi Benedict,

I still need to figure out exactly what the update should be; I submitted this ticket while working with jmg upon discovery that the handbook doesn't match the implementation.

Developers should indeed be updating the documentation as they make these changes.

Anyhow, I will update this or submit a Phabricator review once I have a handle on what the change should be.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2021-07-27 21:05:14 UTC
We have these sysctls to control behaviour:

ebug.debugger_on_trap: Run debugger on kernel trap before panic
debug.debugger_on_recursive_panic: Run debugger on recursive kernel panic
debug.debugger_on_panic: Run debugger on kernel panic
debug.kdb.panic: set to panic the kernel
debug.kdb.enter: set to enter the debugger
debug.kdb.break_to_debugger: Enable break to debugger
debug.kdb.alt_break_to_debugger: Enable alternative break to debugger

and these kernel options:

#
# Don't enter the debugger for a panic. Intended for unattended operation
# where you may want to enter the debugger from the console, but still want
# the machine to recover from a panic.
#
options         KDB_UNATTENDED

# Options for serial drivers that support consoles:
options         BREAK_TO_DEBUGGER       # A BREAK/DBG on the console goes to
                                        # ddb, if available.

# 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.  There are FreeBSD extensions:
# CR ~ ^p requests force panic and CR ~ ^r requests a clean reboot.
options         ALT_BREAK_TO_DEBUGGER