summaryrefslogtreecommitdiffstats
path: root/sys/ddb
AgeCommit message (Collapse)AuthorFilesLines
2021-03-12spellingjsg1-2/+2
2021-02-09ddb: when a new wsdisplay console attaches, resize ddb cols/rows to itjcs2-2/+10
ok visa
2021-01-09Finish converting ddb_sysctl to sysctl_int_boundedgnezdo1-27/+7
I missed the verbose pattern that it used for error checking the first time around. OK millert@
2020-12-10Convert ddb_sysctl to sysctl_bounded_arrgnezdo1-13/+11
ok gkoehler@
2020-10-26add a top-level "reboot" command, for people who keep forgetting "boot reboot"deraadt1-1/+2
ok kn
2020-10-15sick of the CMU, let's make this KNFderaadt14-628/+591
2020-05-26Stop requiring that .strtab has long alignment.gkoehler1-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@
2020-01-20Separate the stack trace saving interface from ddb. The saving does notvisa2-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@
2020-01-09If the kernel panics due to SMEP or SMAP, print correct stack tracebluhm1-3/+5
and pass information to ddb. This helps to debug kernel NULL pointer function calls. input guenther@; OK kettenis@
2019-11-12Default to 0 arguments if no symbol has been found in the CTF section.mpi1-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@
2019-11-07db_addr_t -> vaddr_tmpi17-73/+72
ok deraadt@
2019-11-07FALSE -> 0, missed in previous.mpi1-2/+2
Spotted by deraadt@
2019-11-06Substitute boolean_t/TRUE/FALSE by int/1/0.mpi10-128/+122
ok dlg@, jasper@, anton@
2019-07-20Get rid of `ddb_is_active' instead use `db_active'.mpi2-5/+2
From Christian Ludwig <christian_ludwig at genua dot de> ok visa@
2019-04-02Fix ddb not to write its history to out of the region. When theyasuoka1-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
2019-04-01remove prototype from earlier version of reboot code. spotted by antontedu1-2/+1
2019-04-01fast track ddb> reboot command to skip anything which might panic again.tedu1-2/+3
ok deraadt
2019-02-15zap trailing empty lineanton1-2/+1
2019-02-15The underlying storage for builtin ddb variables are of type int butanton1-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@
2019-01-09Printing hex values with right adjustment makes it easier to comparebluhm1-2/+2
corresponding digits. So the change the ddb x/x output. OK sashan@ deraadt@ visa@ mpi@
2018-09-18whitespace fix; no binary changeanton1-2/+2
2018-08-31Pass the correct size to free(9) in the error path of db_ctf_decompress().bluhm1-2/+2
OK jasper@
2018-05-07Make the print function of db_print_stack_trace() configurable,visa2-7/+9
and indicate if a saved stack trace is empty. OK guenther@
2018-01-09Do not truncate 64bit integers when pretty-printing types.mpi1-2/+16
2018-01-05Show uvm_fault and trace when typing show panic on a page fault'd kernelpirofti1-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@.
2017-12-13Add 'bt' an alias for 'trace'.mpi1-1/+2
ok pirofti@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyderaadt1-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
2017-11-27Remove MALLOC_DEBUG left overs.mpi1-10/+1
From Klemens Nanni.
2017-11-06remove ctf_type declaration no longer needed since -r1.33jasper1-2/+0
ok mpi@
2017-11-01Remove forward declaration hack now that ctfconv(1) merge them correctly.mpi1-8/+1
ok jasper@
2017-10-27Use <elf.h> in !_KERNEL code path.mpi1-2/+2
2017-10-19ddb "show all mounts" showed everything except the address of thebluhm1-2/+4
mount point. Print it to allow debugging through the data structures from there. OK krw@
2017-10-13return a missing return (was left out of previous)jasper1-1/+2
2017-10-13- use db_printf()jasper1-2/+7
- refuse to pretty-print if there's no CTF ok mpi@
2017-10-11missing prototype for db_ctf_pprintjasper1-1/+2
ok mpi@
2017-09-29New ddb(4) command: kill.mpi2-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@
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarmpi4-777/+1
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-12Skip forward declarations until ctfconv(1) properly merge them withmpi1-1/+8
the corresponding struct definitions. ok dlg@
2017-09-08If you use sys/param.h, you don't need sys/types.hderaadt4-10/+6
2017-09-06use sizeof(variable) instead of sizeof(type) to shorten some codedlg1-2/+2
2017-09-06when pretty printing a pointer, display its value instead of address.dlg1-2/+6
this makes it consistent with printing of other values. ok mpi@
2017-09-06replace the DDB_STRUCT backend for "show struct" with ctf code.dlg3-7/+92
this lets you inspect arbitrary memory in the kernel as a specified struct. ok mpi@ jasper@
2017-08-14db_ctf_pprintf() doesn't actually support formatting, so s/f$//uwe1-6/+6
ok mpi@
2017-08-14Restore "print" in ddb; add "pp[rint]" for pretty-printinguwe2-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@
2017-08-11Merge DDBCTF into DDB.mpi2-7/+1
2017-08-11Fall back using db_print_cmd() if no CTF data has been found.mpi1-8/+7
2017-08-11Improve pretty printing of pointers.mpi1-7/+39
ok jasper@
2017-08-11Kernel compilation with DDBPROF enabled fails as db_sym_t is no longernayden1-4/+4
defined (removed in "Kill db_sym_t." from 2017-05-30 11:39 mpi). This change fixes the problem. OK mpi@
2017-08-11Remove debugging leftovers, document functions, bump copyright.mpi1-27/+11
2017-08-10With a CTF kernel, DDB's print command will now pretty-print symbols.mpi5-45/+319
Casting a type is not yet supported. ok kettenis@, jasper@