summaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.c
AgeCommit message (Collapse)Author
2018-01-05Show uvm_fault and trace when typing show panic on a page fault'd kernelPaul Irofti
Currently there is only support for amd64, if this change settles I will add support for the rest of the architectures. OK kettenis@.
2017-12-13Add 'bt' an alias for 'trace'.Martin Pieuchot
ok pirofti@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-11-27Remove MALLOC_DEBUG left overs.Martin Pieuchot
From Klemens Nanni.
2017-10-19ddb "show all mounts" showed everything except the address of theAlexander Bluhm
mount point. Print it to allow debugging through the data structures from there. OK krw@
2017-09-29New ddb(4) command: kill.Martin Pieuchot
Send an uncatchable SIGABRT to the process specified by the pid argument. Useful in case of CPU exhaustion to kill the DoSing process and generate a core for later inspection. ok phessler@, visa@, kettenis@, miod@
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarMartin Pieuchot
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-06replace the DDB_STRUCT backend for "show struct" with ctf code.David Gwynne
this lets you inspect arbitrary memory in the kernel as a specified struct. ok mpi@ jasper@
2017-08-14Restore "print" in ddb; add "pp[rint]" for pretty-printingUwe Stuehler
Changing the "print" command to use db_ctf_pprint_cmd() broke all documented uses and "examine" does not allow printing variables, or individual registers. For now it is better to leave the "print" command intact, and in sync with the ddb(4) man page, but we still want "pp[rint]" to replace the "print" command when it works better. ok mpi@
2017-08-11Merge DDBCTF into DDB.Martin Pieuchot
2017-08-10With a CTF kernel, DDB's print command will now pretty-print symbols.Martin Pieuchot
Casting a type is not yet supported. ok kettenis@, jasper@
2017-04-20Add a port of witness(4) lock validation tool from FreeBSD.Visa Hankala
Go-ahead from kettenis@, guenther@, deraadt@
2016-04-19Do not expose private functions.Martin Pieuchot
2016-04-19Keep db_write_cmd() in the only place where it is used, just like we didMartin Pieuchot
with db_show_regs().
2016-03-09Move db_show_regs() in the only file where it is used and turn it private.Martin Pieuchot
ok mlarkin@
2016-01-25Kill trailing whitespaces. No object change.Martin Pieuchot
2016-01-15add a "show socket" command to ddbDavid Gwynne
should help inspecting socket issues in the future. enthusiasm from mpi@ bluhm@ deraadt@
2015-12-23assign pointers NULL rather than 0mmcc
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2014-07-11reboot(9): Add MI reboot entry functionMasao Uebayashi
Now, for kernel to "reboot" (reboot, halt, or shutdown), MD boot(9) is called in some places. This change introduces a new MI function reboot(9) which is simply a wrapper to call MD boot(9). OK kettenis@ deraadt@
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2010-11-05Implement m_print as real ddb command "show mbuf addr" in the way otherClaudio Jeker
such commands are implemented. "Ja! You'll need to update ddb.4 as well, of course." miod@
2010-01-19A couple #ifdefs were missed when the final name of the DDB_STRUCTPhilip Guenthe
option was settled on. Fix those last couple so that the new commands are actually accessible. "Oops" miod@
2009-08-17dd 'show all bufs' to show all the buffers in the systemJasper Lievisse Adriaanse
ok beck@ thib@
2009-08-14add ddb functions to be able to show all the nfsnodes in the systemThordur I. Bjornsson
and rewrite the nfsreq code to use pool_walk(). OK beck@, blambert@
2009-08-13fix a typo its supposed to be show all vnodes not show all vnodes,Thordur I. Bjornsson
ddb does keyword matching so i missed this. spotted by jasper@
2009-08-13add a show all vnodes command, use dlg's nice pool_walk() to accomplishThordur I. Bjornsson
this. ok beck@, dlg@
2009-08-09Introduce option DDB_STRUCT. Kernels compiled with this option (except onMiod Vallat
a few arches where toolchain limitations apply) will embed some symbolic information about the various structs used within the kernel, and have new ddb commands allowing struct display and some useful information gathering. Kernel rodata increase varies accross platforms from ~150KB to ~300KB. This option is not enabled by default.
2009-08-08two things:Bob Beck
1) fix buffer cache low water mark to allow for extremely low memory machines without dying 2) Add "show bcstats" to ddb to allow for looking at the buffer cache statistics in ddb ok art@ oga@
2009-07-15Check db_recover for NULL before longjmp(db_recover) in db_error(), as it canMiod Vallat
be NULL on panic. Of course, panic usually never produce enough output to hit db_more(), except when it's cold and we run an automatic traceback; aborting the traceback with `q' would then lead to undefined behaviour.
2009-06-17Revert bufq's. this is inline with the major midlayer reverts thatThordur I. Bjornsson
have been going on. this appears to bring us back to stable state. lots of testing by oga and ariane and my self.
2009-06-03add a flexible buffer queue (bufq) api, based on the never usedThordur I. Bjornsson
one by tedu@. It doesn't do anything smart yet, it just uses plain old disksort. we also keep the old method of queueing bufs since some miods have crazy MD drivers that need some love. ok beck@, art@ tested by many on many archs.
2009-01-20Let this compile on landisk (and other configs) by wrapping the nfsThordur I. Bjornsson
debug stuff inside #ifdef NFSCLIENT. prompted by todd, miod
2009-01-18Add nfs ddb hooks, for now only to show all the outstanding nfsreq'sThordur I. Bjornsson
and to print out struct nfsreq. "get it in so people can pound on it" blambert@ OK and information_s_ on the manpage from miod@
2008-03-23show all mounts command for ddb. From mickey a long time ago.Miod Vallat
2007-11-14Be consistent in db_cmd_loop_done declaration.Miod Vallat
2007-11-05temporary ddb buffers need to be a bit larger on 64 bit systems to cope withMiod Vallat
some radix configurations.
2007-09-01Use db_format() instead of ddb-specific format specifiers; no functionalMiod Vallat
change inteded. ok ray@
2006-09-30no malloc debug but configured kmemstats allow 'sh mal' to print smth ↵Michael Shalayeff
useful; miod@ ok
2006-08-24Off-by-one in ``dmesg'' command; it takes a vax to find such bugs.Miod Vallat
2006-07-11add mount/vnode/buf and softdep printing commands; tested on a few archs and ↵Michael Shalayeff
will make pedro happy too (;
2006-05-20add show all pools command listing all pools as vmstat -m does; miod@ okMichael Shalayeff
2006-03-13ansi/deregister. No binary change.Jonathan Gray
2005-05-10db_printf(s) -> db_printf("%s", s) from NetBSDUwe Stuehler
2005-01-03Add "show panic" command to ddb, to easily retrieve the panic message.Miod Vallat
Will hopefully bring us better panic reports. From Joris Vink.
2004-06-25Instead of accessing ci_dev (that's an MI field), provide a marco thatArtur Grabowski
translates a cpu_info structure into a human-readable cpu number. drahn@ deraadt@ ok
2004-06-21Make 'machine ddbcpu' work, and use CPU device number instead of APIC idAndreas Gunnarsson
KNF lesson and ok from niklas@
2004-06-13debranch SMP, have funNiklas Hallqvist
2004-04-25kill unbounded string op. deraadt okJun-ichiro itojun Hagino
2004-03-15Remove errant semi-colon. miod@ okAaron Campbell