summaryrefslogtreecommitdiffstats
path: root/sys/ddb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-121-2/+2
|
* ddb: when a new wsdisplay console attaches, resize ddb cols/rows to itjcs2021-02-092-2/+10
| | | | ok visa
* Finish converting ddb_sysctl to sysctl_int_boundedgnezdo2021-01-091-27/+7
| | | | | | | I missed the verbose pattern that it used for error checking the first time around. OK millert@
* Convert ddb_sysctl to sysctl_bounded_arrgnezdo2020-12-101-13/+11
| | | | ok gkoehler@
* add a top-level "reboot" command, for people who keep forgetting "boot reboot"deraadt2020-10-261-1/+2
| | | | ok kn
* sick of the CMU, let's make this KNFderaadt2020-10-1514-637/+600
|
* Stop requiring that .strtab has long alignment.gkoehler2020-05-261-3/+2
| | | | | | | | When ddb loads symbols, the .strtab contains char strings and doesn't need long alignment. Our bootloader provides long alignment, but I started loading symbols on powerpc64 without our bootloader. ok mpi@ guenther@ kettenis@
* Separate the stack trace saving interface from ddb. The saving does notvisa2020-01-202-13/+4
| | | | | | | | | | require the debugger on most architectures, and the separation makes the code easier to use from other subsystems. The function definitions are still conditional to DDB. However, that should not matter for now. OK deraadt@, mpi@
* If the kernel panics due to SMEP or SMAP, print correct stack tracebluhm2020-01-091-3/+5
| | | | | | and pass information to ddb. This helps to debug kernel NULL pointer function calls. input guenther@; OK kettenis@
* Default to 0 arguments if no symbol has been found in the CTF section.mpi2019-11-121-2/+2
| | | | | | | | | | Symbols not present in the CTF data are generally assembly routines which have either no argument or do not follow the ABI that the various MD stack unwinders understand. This makes ddb(4) trace simpler to understand. ok jasper@
* db_addr_t -> vaddr_tmpi2019-11-0717-73/+72
| | | | ok deraadt@
* FALSE -> 0, missed in previous.mpi2019-11-071-2/+2
| | | | Spotted by deraadt@
* Substitute boolean_t/TRUE/FALSE by int/1/0.mpi2019-11-0610-128/+122
| | | | ok dlg@, jasper@, anton@
* Get rid of `ddb_is_active' instead use `db_active'.mpi2019-07-202-5/+2
| | | | | | From Christian Ludwig <christian_ludwig at genua dot de> ok visa@
* Fix ddb not to write its history to out of the region. When theyasuoka2019-04-021-1/+3
| | | | | | | inputted line just ends at sizeof(db_history), ddb started writing the histories to out of the region. diff from IIJ. ok deraadt anton
* remove prototype from earlier version of reboot code. spotted by antontedu2019-04-011-2/+1
|
* fast track ddb> reboot command to skip anything which might panic again.tedu2019-04-011-2/+3
| | | | ok deraadt
* zap trailing empty lineanton2019-02-151-2/+1
|
* The underlying storage for builtin ddb variables are of type int butanton2019-02-151-2/+2
| | | | | | | | | referenced to using a pointer to long. When writing to such a variable, cast it to the correct type. Writing would otherwise on 64-bit architectures cause the next variable adjacent in memory to also be modified. ok deraadt@ visa@
* Printing hex values with right adjustment makes it easier to comparebluhm2019-01-091-2/+2
| | | | | corresponding digits. So the change the ddb x/x output. OK sashan@ deraadt@ visa@ mpi@
* whitespace fix; no binary changeanton2018-09-181-2/+2
|
* Pass the correct size to free(9) in the error path of db_ctf_decompress().bluhm2018-08-311-2/+2
| | | | OK jasper@
* Make the print function of db_print_stack_trace() configurable,visa2018-05-072-7/+9
| | | | | | and indicate if a saved stack trace is empty. OK guenther@
* Do not truncate 64bit integers when pretty-printing types.mpi2018-01-091-2/+16
|
* Show uvm_fault and trace when typing show panic on a page fault'd kernelpirofti2018-01-051-1/+7
| | | | | | | Currently there is only support for amd64, if this change settles I will add support for the rest of the architectures. OK kettenis@.
* Add 'bt' an alias for 'trace'.mpi2017-12-131-1/+2
| | | | ok pirofti@
* In uvm Chuck decided backing store would not be allocated proactivelyderaadt2017-12-111-7/+16
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove MALLOC_DEBUG left overs.mpi2017-11-271-10/+1
| | | | From Klemens Nanni.
* remove ctf_type declaration no longer needed since -r1.33jasper2017-11-061-2/+0
| | | | ok mpi@
* Remove forward declaration hack now that ctfconv(1) merge them correctly.mpi2017-11-011-8/+1
| | | | ok jasper@
* Use <elf.h> in !_KERNEL code path.mpi2017-10-271-2/+2
|
* ddb "show all mounts" showed everything except the address of thebluhm2017-10-191-2/+4
| | | | | | mount point. Print it to allow debugging through the data structures from there. OK krw@
* return a missing return (was left out of previous)jasper2017-10-131-1/+2
|
* - use db_printf()jasper2017-10-131-2/+7
| | | | | | - refuse to pretty-print if there's no CTF ok mpi@
* missing prototype for db_ctf_pprintjasper2017-10-111-1/+2
| | | | ok mpi@
* New ddb(4) command: kill.mpi2017-09-292-2/+4
| | | | | | | | 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@
* Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarmpi2017-09-124-777/+1
| | | | | | functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
* Skip forward declarations until ctfconv(1) properly merge them withmpi2017-09-121-1/+8
| | | | | | the corresponding struct definitions. ok dlg@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-084-10/+6
|
* use sizeof(variable) instead of sizeof(type) to shorten some codedlg2017-09-061-2/+2
|
* when pretty printing a pointer, display its value instead of address.dlg2017-09-061-2/+6
| | | | | | this makes it consistent with printing of other values. ok mpi@
* replace the DDB_STRUCT backend for "show struct" with ctf code.dlg2017-09-063-7/+92
| | | | | | | this lets you inspect arbitrary memory in the kernel as a specified struct. ok mpi@ jasper@
* db_ctf_pprintf() doesn't actually support formatting, so s/f$//uwe2017-08-141-6/+6
| | | | ok mpi@
* Restore "print" in ddb; add "pp[rint]" for pretty-printinguwe2017-08-142-5/+6
| | | | | | | | | | | 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@
* Merge DDBCTF into DDB.mpi2017-08-112-7/+1
|
* Fall back using db_print_cmd() if no CTF data has been found.mpi2017-08-111-8/+7
|
* Improve pretty printing of pointers.mpi2017-08-111-7/+39
| | | | ok jasper@
* Kernel compilation with DDBPROF enabled fails as db_sym_t is no longernayden2017-08-111-4/+4
| | | | | | | defined (removed in "Kill db_sym_t." from 2017-05-30 11:39 mpi). This change fixes the problem. OK mpi@
* Remove debugging leftovers, document functions, bump copyright.mpi2017-08-111-27/+11
|
* With a CTF kernel, DDB's print command will now pretty-print symbols.mpi2017-08-105-45/+319
| | | | | | Casting a type is not yet supported. ok kettenis@, jasper@