aboutsummaryrefslogtreecommitdiff
path: root/share/man/man4/ddb.4
Commit message (Collapse)AuthorAgeFilesLines
* ddb: enable the use of ^C and ^S/^QRyan Libby2021-03-141-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | This lets one interrupt DDB's output, which is useful if paging is disabled and the output device is slow. This follows a previous implementation in svn r311952 / git 5fddef79998678d256ba30316353393b4d8ebb32 which was reverted because it broke DDB type-ahead. Now, try this again, but with a 512-byte type-ahead buffer. While there is buffer space, control input is handled and non-control input is buffered. When the buffer is exhausted, the default is to print a warning and drop further non-control input in order to continue handling control input. sysctl debug.ddb.prioritize_control_input can be set to 0 to instead preserve all input but lose immediate handling of control input. This could for example effect pasting of a large script into the ddb console. Suggested by: Anton Rang <rang@acm.org> Reviewed by: markj Discussed with: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28676
* man: remove stale references to ndis(4)Marius Strobl2021-01-261-6/+1
| | | | The latter has been removed in bfc99943b04b46a6c1c885ce7bcc6f235b7422aa.
* ddb: add ability to print user registersmhorne2021-01-081-7/+3
| | | | | | | | | | | | | | | | | | | | The debugger is always entered after some kind of kernel trap, often a breakpoint in kdb_enter(). This means that the most recent trapframe will include kernel state at the time of the trap, when often it is desirable to the developer to view the contents of the previous trapframe. This trapframe often corresponds to the entry from userspace. The ddb(4) man page claims the ability to display user register state via the 'u' modifier to `show registers`, but this appears untrue. It is not obvious from a quick search of the history when this feature was added, or when it was removed. (Re)implement this feature in db_show_regs, noting that it is not necessarily populated with userspace state. Reviewed by: jhb (earlier version), markj, bcr (manpages) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27705
* Add an option for entering KDB on recursive panicsMitchell Horne2020-11-191-1/+11
| | | | | | | | | | | | | | | | | | | | There are many cases where one would choose avoid entering the debugger on a normal panic, opting instead to reboot and possibly save a kernel dump. However, recursive kernel panics are an unusual case that might warrant attention from a human, so provide a secondary tunable, debug.debugger_on_recursive_panic, to allow entering the debugger only when this occurs. For for simplicity in maintaining existing behaviour, the tunable defaults to zero. Reviewed by: cem, markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27271 Notes: svn path=/head/; revision=367848
* Fix a bunch of mdoc issues found by mandoc -Tlint.Christian Brueffer2020-09-221-2/+0
| | | | Notes: svn path=/head/; revision=366012
* Remove sparc64 specific bits of the man pages.Warner Losh2020-02-121-6/+0
| | | | Notes: svn path=/head/; revision=357794
* Implement NetGDB(4)Conrad Meyer2019-10-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetGDB(4) is a component of a system using a panic-time network stack to remotely debug crashed FreeBSD kernels over the network, instead of traditional serial interfaces. There are three pieces in the complete NetGDB system. First, a dedicated proxy server must be running to accept connections from both NetGDB and gdb(1), and pass bidirectional traffic between the two protocols. Second, the NetGDB client is activated much like ordinary 'gdb' and similarly to 'netdump' in ddb(4) after a panic. Like other debugnet(4) clients (netdump(4)), the network interface on the route to the proxy server must be online and support debugnet(4). Finally, the remote (k)gdb(1) uses 'target remote <proxy>:<port>' (like any other TCP remote) to connect to the proxy server. The NetGDB v1 protocol speaks the literal GDB remote serial protocol, and uses a 1:1 relationship between GDB packets and sequences of debugnet packets (fragmented by MTU). There is no encryption utilized to keep debugging sessions private, so this is only appropriate for local segments or trusted networks. Submitted by: John Reimer <john.reimer AT emc.com> (earlier version) Discussed some with: emaste, markj Relnotes: sure Differential Revision: https://reviews.freebsd.org/D21568 Notes: svn path=/head/; revision=353700
* debugnet(4): Infer non-server connection parametersConrad Meyer2019-10-171-1/+1
| | | | | | | | | | | | | | | | Loosen requirements for connecting to debugnet-type servers. Only require a destination address; the rest can theoretically be inferred from the routing table. Relax corresponding constraints in netdump(4) and move ifp validation to debugnet connection time. Submitted by: John Reimer <john.reimer AT emc.com> (earlier version) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D21482 Notes: svn path=/head/; revision=353694
* Add ddb(4) 'netdump' command to netdump a core without preconfigurationConrad Meyer2019-10-171-75/+64
| | | | | | | | | | | | | | | | | Add a 'X -s <server> -c <client> [-g <gateway>] -i <interface>' subroutine to the generic debugnet code. The imagined use is both netdump, shown here, and NetGDB (vaporware). It uses the ddb(4) lexer, with some new extensions, to parse out IPv4 addresses. 'Netdump' uses the generic debugnet routine to load a configuration and start a dump, without any netdump configuration prior to panic. Loosely derived from work by: John Reimer <john.reimer AT emc.com> Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D21460 Notes: svn path=/head/; revision=353692
* ddb: Add CSV option, sorting to 'show (malloc|uma)'Conrad Meyer2019-10-111-7/+24
| | | | | | | | | | | | | | | | | Add /i option for machine-parseable CSV output. This allows ready copy/ pasting into more sophisticated tooling outside of DDB. Add total zone size ("Memory Use") as a new column for UMA. For both, sort the displayed list on size (print the largest zones/types first). This is handy for quickly diagnosing "where has my memory gone?" at a high level. Submitted by: Emily Pettigrew <Emily.Pettigrew AT isilon.com> (earlier version) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=353429
* ddb(4): Add 'show route <dest>' and 'show routetable [<af>]'Conrad Meyer2019-09-091-1/+15
| | | | | | | | | | | | These commands show the route resolved for a specified destination, or print out the entire routing table for a given address family (or all families, if none is explicitly provided). Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D21510 Notes: svn path=/head/; revision=352112
* Revert r341337; according to imp@ we still support these.Edward Tomasz Napierala2018-11-301-0/+9
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=341342
* Use .Va for sysctls, not .Dv.Edward Tomasz Napierala2018-11-301-30/+30
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=341340
* Remove duplicated word.Edward Tomasz Napierala2018-11-301-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=341339
* Say in plain text what the 'debug' keymap action usually is.Edward Tomasz Napierala2018-11-301-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=341338
* Remove the hint for ISA buses; we don't support them anymore.Edward Tomasz Napierala2018-11-301-10/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=341337
* Random tweaks to ddb(4) manual page.Edward Tomasz Napierala2018-11-101-4/+6
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=340342
* ddb: Enable 'thread <address>'Conrad Meyer2018-10-201-5/+16
| | | | | | | | | | | | | | | | | | Currently, the 'thread' command (to switch the debugger to another thread) only accepts decimal-encoded tids. Use the same parsing logic as 'show thread <arg>' to accept hex-encoded thread pointers in addition to decimal-encoded tids. Document the 'thread' command in ddb.4 and expand the 'show thread' documentation to cover the tid usage. Reported by: bwidawsk Reviewed by: bwidawsk (earlier version), kib (earlier version), markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16962 Notes: svn path=/head/; revision=339486
* Mention setting $lines to 0 in ddb can disable pagingLi-Wen Hsu2018-09-211-1/+2
| | | | | | | | | | | Reviewed by: bcr (earlier version), markj Approved by: re (kib), markj (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17068 Notes: svn path=/head/; revision=338851
* add an option for ddb ps command to print process argumentsAndriy Gapon2018-08-091-5/+4
| | | | | | | | | | | | | | | | | | | We use ps to collect the information of all processes in textdump. But it doesn't contain process arguments which however sometimes are very useful for debugging. The new 'a' modifier adds that capability. While here, remove 'm' modifier from ddb.4. It was in the manual page from its very first revision, but I could not find any evidence of the code ever supporting it. Submitted by: Terry Hu <thu@panzura.com> Reviewed by: kib MFC after: 1 week Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D16603 Notes: svn path=/head/; revision=337528
* Sometimes it is helpful to get the path for a vnode.Bjoern A. Zeeb2018-06-201-1/+6
| | | | | | | | | | | | Implement a ddb function walking the namecache to do this. Reviewed by: jhb, mjg Inspired by: gdb macro from jhb (old version) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D14898 Notes: svn path=/head/; revision=335437
* Remove unused declaration and update ddb.4Conrad Meyer2017-08-241-4/+5
| | | | | | | | | | | | | A follow-up to r322836. Warnings for the unused declaration were breaking some second tier architectures, but did not show up in Clang on x86. Reported by: markj (ddb.4), emaste (declaration) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=322853
* Clean up ddb(4) slightlyEnji Cooper2017-03-031-20/+20
| | | | | | | | | | | | | | | | - Delete empty Li macro uses [1]. This removes some spaces between the optional command/subcommand arguments. - Attempt to clarify "show lock" subcommand by being more terse/direct. This addresses an issue with a contraction [2]. MFC after: 1 week Reported by: make manlint [1], igor [2] Reviewed by: wblock Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9858 Notes: svn path=/head/; revision=314610
* Determine the operand/address size of %cs in a new functionBruce Evans2016-09-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | db_segsize(). Use db_segsize() to set the default operand/address size for disassembling. Allow overriding this with the "alternate" display format /I. The API of db_disasm() should be debooleanized to pass a more general request (amd64 needs overrides to sizes of 16, 32, and 64, but this commit doesn't implement anything for amd64 since much larger changes are needed to restore the amd64 disassmbler's support for non-default sizes). Fix db_print_loc_and_inst() to ask for the normal format and not the alternate in normal operation. This is most useful for vm86 mode, but also works for 16-bit protected mode. Use db_segsize() to avoid trying to print a garbage stack trace if %cs is 16 bits. Print something like the stack trace termination message for a trap boundary instead. Document that the alternate format is now useful on i386. Notes: svn path=/head/; revision=306311
* Give the full syntax of the 'count' arg for all commmands that supportBruce Evans2016-09-091-34/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | it. This arg is most interesting for the 'break' command where it never worked, and for the step command where it is powerful but too fragile to use much. Give the full syntax of the 'addr' arg for these commands and some others. Rename it from 'address' for the generic command. Fix description of how 'count' is supposed to work for the 'break' command. Don't (mis)describe the syntax of the comma for the 'step' command. Expand the description for the generic command. Give the full syntax for the 'examine' command. It was also missing the possible values for the modifier. Fix mdoc syntax error for the 'search' command. Remove FUD about consequences of not having a trap handler for the 'search' command. Notes: svn path=/head/; revision=305661
* Document DDB's "alltrace" and "show all trace" commands.Mark Johnston2016-07-141-1/+6
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=302797
* Add a `show igi_list` command to DDB to debug IGMP state.Bjoern A. Zeeb2016-06-061-0/+7
| | | | | | | | | Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=301527
* Implement a `show panic` command to DDB which will helpfully print theBjoern A. Zeeb2016-06-061-1/+12
| | | | | | | | | | | | | | | | | | | panic string again if set, in case it scrolled out of the active window. This avoids having to remember the symbol name. Also add a show callout <addr> command to DDB in order to inspect some struct callout fields in case of panics in the callout code. This may help to see if there was memory corruption or to further ease debugging problems. Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Reviewed by: jhb (comment only on the show panic initally) Differential Revision: https://reviews.freebsd.org/D4527 Notes: svn path=/head/; revision=301522
* Split 'show vnets' into 'show vnet' and 'show all vnets'.Bjoern A. Zeeb2016-05-181-1/+13
| | | | | | | | | | | While here adjust some db_printf format string. Document the two show commands in ddb.4. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300148
* Fix bunch of .Xrs.Edward Tomasz Napierala2016-03-281-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=297355
* Bump .Dd for the content changesEnji Cooper2016-01-161-1/+1
| | | | Notes: svn path=/head/; revision=294132
* trim-time? What was I thinking. run-time.Warner Losh2016-01-161-1/+1
| | | | | | | Noticed by: Allan Jude Notes: svn path=/head/; revision=294122
* Add some clarifications.Warner Losh2016-01-161-4/+9
| | | | Notes: svn path=/head/; revision=294121
* Fix spelling of IPMIEnji Cooper2016-01-141-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=294026
* Update .Dd, missed in r294011Benjamin Kaduk2016-01-141-1/+1
| | | | Notes: svn path=/head/; revision=294023
* Document how to enter the debugger here. I'm sure there's some betterWarner Losh2016-01-141-0/+41
| | | | | | | | | | canonical place, and the nit-pickers are welcome to move this information there with a cross reference. Differential Review: https://reviews.freebsd.org/D4860 Notes: svn path=/head/; revision=294011
* When dumping an rman in DDB, include the RID of each resource.John Baldwin2015-11-051-3/+3
| | | | | | | | | | Submitted by: Ravi Pokala (rpokala@panasas.com) Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4086 Notes: svn path=/head/; revision=290429
* Bump the date after the `show devmap` addition.Stanislav Sedov2015-03-171-1/+1
| | | | Notes: svn path=/head/; revision=280158
* Document the `show devmap` DDB command.Stanislav Sedov2015-03-171-0/+7
| | | | Notes: svn path=/head/; revision=280157
* Grammar and spelling fixes.Sergey Kandaurov2014-07-221-2/+2
| | | | Notes: svn path=/head/; revision=268988
* Also link 'show bio' to g_bio(9.)Bryan Drewery2014-07-151-1/+3
| | | | | | | | | X-MFC-With: r268715 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=268722
* Document the 'show bio' command added in 2009.Bryan Drewery2014-07-151-10/+17
| | | | | | | | | | | While here also reword 'show buffer' to have an 'addr' argument and to match other struct documentation. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=268715
* Save some space by noting we don't have any alternative instruction formats.Warner Losh2013-11-071-13/+1
| | | | Notes: svn path=/head/; revision=257802
* Update ddb(9) to show how to print 64-bit values with "examine".Robert Watson2013-09-301-1/+3
| | | | | | | | MFC after: 3 days Approved by: re (gjb) Notes: svn path=/head/; revision=255948
* Sort textdump options list.Joel Dahl2012-11-011-6/+6
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=242441
* Small textdump enhancements.Alfred Perlstein2012-11-011-0/+4
| | | | | | | | | | | | | | | | | Allow textdumps to be called explicitly from DDB. If "dump" is called in DDB and textdumps are enabled then abort the dump and tell the user to turn off textdumps. Add options TEXTDUMP_PREFERRED to turn textdumps on by default. Add options TEXTDUMP_VERBOSE to be a bit more verbose while textdumping. Reviewed by: rwatson MFC after: 2 weeks Notes: svn path=/head/; revision=242424
* Minor mdoc nit.Joel Dahl2012-05-121-1/+1
| | | | Notes: svn path=/head/; revision=235353
* General mdoc(7) and typo fixes.Glen Barber2012-05-121-2/+2
| | | | | | | | | PR: 167776 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Notes: svn path=/head/; revision=235317
* Document 'findstack'.Konstantin Belousov2011-12-161-1/+11
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=228570
* Disconnect sun4v architecture from the three.Attilio Rao2011-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 Notes: svn path=/head/; revision=221869