summaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.c
AgeCommit message (Collapse)Author
2023-05-25ddb: PR kern/57435 - fix duplicate "show mount"uwe
Bolivar cannot carry double. One of these commands should have been "show mounts", cf. page/pages and a few others. While here fix the function name to be db_show_all_mounts to conform to the pattern.
2022-04-28Remove 'a' modifier from "show vmem". It was removed in sbur_vmem.c rev. 1.55.msaitoh
2022-04-20ddb: guard invocation of db_cmd_on_enter properly.uwe
db_command_loop - do not ignore the return value from setjmp used to guard db_cmd_on_enter. We do not want to re-execute the enter command if it fails. Note that "fails" includes e.g. aborting long output from the enter command with "q" at the --db more-- prompt, which is quite likely as the default enter command is "bt". While here, don't even bother with the whole song and dance if the enter command is not set.
2021-10-10Add a "show kqueue <addr>" command.thorpej
2021-08-21fix mainly same typos as in my previous commit but outside sys/dev/dm.andvar
2021-08-13fix typos in words "pointer" and s/fram /frame/andvar
2021-02-23introduce DDB_END_CMD and replace more than 20 copies of the samemrg
list of NULLs and 0. idea from rillig@. all touched ports built, several booted.
2020-10-30Remove "also;"skrll
2020-10-30Add a "show fdt" ddb commandskrll
2020-10-30Sort the db_show_cmd entriesskrll
2020-10-30Put the 'added from all sub cmds' comment above the four commands thatskrll
were added as part of the work in r1.98
2020-10-30Trailing whitespaceskrll
2020-04-13Handle "no count" properly in db_kernhist_print_cmdskrll
2020-03-10Make the db_kernelonly() macro visible to all files and re-use it.christos
Register access is kernel only.
2020-03-09print a message for the commands crash does not support.christos
Allow "show lock"
2020-01-01- Introduce a new global kernel variable "shutting_down" to indicate thatthorpej
the system is shutting down or rebooting. - Set this global in a new function called kern_reboot(), which is currently just a basic wrapper around cpu_reboot(). - Call kern_reboot() instead of cpu_reboot() almost everywhere; a few places remain where it's still called directly, but those are in early pre-main() machdep locations. Eventually, all of the various cpu_reboot() functions should be re-factored and common functionality moved to kern_reboot(), but that's for another day.
2019-12-27Redo the page allocator to perform better, especially on multi-core andad
multi-socket systems. Proposed on tech-kern. While here: - add rudimentary NUMA support - needs more work. - remove now unused "listq" from vm_page.
2019-12-15Teach ddb(4) about printing the full mount list.joerg
2019-09-29db_command - don't hide local static variable in the middle of otheruwe
local variable definitions. While here, get rid of the alignment of variable names.
2019-09-29db_command - make setting have_addr more clear.uwe
Don't set it to false that it's already initialized to.
2019-09-29db_command - make sure count is always initialized.uwe
2019-09-22fix "show kernhist".mrg
set addr = 0 if we don't have_addr and avoid using random garbage in addr.
2018-09-17When this file is used when not building the kernel (eg: /usr/sbin/crash)kre
make cnpollc() go away.
2018-09-16call cnpollc(1) and cnpollc(0) around cngetc().mrg
(christos has a good idea to add a function that does all 3, and we should switch all the callers in this sequence to use it (and fix the MD ones missing it still). not all can, as eg, line-grabbing functions can use cngetsn(), which only calls cnpollc() twice.)
2018-09-15call spl0() before cpu_reboot(), so that there's a chance that:mrg
- interrupts can work afterwards - this also means if IO stalls, serial break might work again. this mimics how reboot(2) ends up calling cpu_reboot().
2018-09-13always call lockdebug_dismiss() from DDB -- there are always somemrg
minimal lockdebug checks in place, even without LOCKDEBUG. adjust lockdebug_abort() to ignore problems after ld_panic is set so that there's a chance of this working. this fixes ddb 'reboot' on softiron od1000.
2018-08-13extend the ddb "show kernhist" command. the synopsis is now:mrg
show kernhist[/i] [addr[,count]] the i modifier means display info instead of entries, and the count restricts to the last count entries. the count option is only supported for specified histories. it could be extended but requires more logic than the single history, as multiple histories are merged during display.
2018-08-12add a lockdebug_dismiss() function for DDB to use that tellsmrg
lockdebug to avoid asserts. use it for the ddb "reboot" command, so that it doesn't matter how ddb was entered, the reboot not trigger mutex checks and not work.
2018-07-20 Add "show socket" command written by Hiroki SUENAGA. It prints usage ofmsaitoh
system's socket buffers.
2018-03-19ddb: rename "show lockstat" to "show lockstats" to avoid conflicting with ↵ozaki-r
lockstat(8) Requested by mrg@
2018-03-16Don't pass a unset address to lockdebug_lock_printozaki-r
2018-03-16Add a new command, show all locks, which shows information of active locksozaki-r
The command shows information of all active (i.e., being held) locks that are tracked through either of LWPs or CPUs by the LOCKDEBUG facility. The /t modifier additionally shows a backtrace for each LWP additionally. This feature is useful for debugging especially to analyze deadlocks. The command is useful only if LOCKDEBUG is enabled.
2018-03-16Add a new command, show lockstat, which shows statistics of locksozaki-r
Currently the command shows the number of allocated locks. The command is useful only if LOCKDEBUG is enabled.
2018-03-04Add command to print device list.mlelstv
2017-01-11Add ddb command to find a vnode by the address of its lock.joerg
This makes it much easier to convert lockstat traces into understandable data.
2016-04-13ddb: rename show arptab to show routesozaki-r
show arptab command of ddb is now inappropriate because it actually dumps routes but arp entries aren't routes anymore. So rename it to show routes and move the code from if_arp.c to route.c. ok christos@
2016-04-06Improve ddb(4) show kernhistskrll
1) really prints all the histories merged together (rather than just the "first" when no argument specified 2) dumps a single history when an argument is given, e.g. "show kernhist usbhist" 3) uses db_printf correctly
2015-05-21only call the on-enter commands if we're not recursing.mrg
avoids having a fault in the on-enter commands repeating.
2015-02-08we can use show callout now from crashchristos
2013-10-19fix userland build, by moving all the unused stuff inside ifdef _KERNELchristos
2013-01-06remove the new command not the old one.christos
2013-01-06remove previous, dmesg just works.christos
2013-01-06Add "show dmesg" that prints the contents of the message buffer.christos
2013-01-05Add "show panic" that shows the current panic string. two ports had it, andchristos
it could be easily made MI.
2012-04-28Remove MALLOC_DEBUG and MALLOCLOG, which is dead code after malloc(9) movermind
to kmem(9). Note: kmem(9) has debugging facilities under DEBUG/DIAGNOSTIC. However, expensive kmguard and debug_freecheck have to be enabled manually.
2011-11-13set panicstr to "reboot forced via kernel debugger" when rebootingmrg
from ddb, similar to how sync from ddb works. this avoids various asserts and other issues during ddb reboot.
2011-05-17move and rename the uvm history code out of uvm_stat to "kernhist".mrg
rename "UVMHIST" option to enable the uvm histories. TODO: - make UVMHIST properly depend upon KERNHIST - enable dynamic registration of histories. this is mostly just allocating something in a bitmap, and is only for viewing multiple histories in a merged form. tested on amd64 and sparc64.
2011-04-10Add:christos
usage: show proc [/a] [/p] address|pid /a == argument is an address of any lwp /p == argument is a pid [default] From: Vladimir Kirillov proger at wilab dot org dot ua
2010-09-13fix extern/static inconsistencydrochner
2009-07-19Add #ifdef MQUEUE for db_show_mqueue_cmd().rmind
XXX: Wrong. DDB should be dynamic, modular, etc.