summaryrefslogtreecommitdiffstats
path: root/sys/ddb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* Goodbye, sys/dkbad.h, you lost your last friend when sparc was removed.zhuk2017-07-291-2/+1
| | | | | | | Spotted and diff provided by Andrey Bolkonskiy <andrey0bolkonsky@gmail.com>, thanks! okay deraadt@
* Header sys/scanio.h has been deleted, do not include it here.bluhm2017-05-301-2/+1
|
* Kill db_sym_t.mpi2017-05-305-30/+24
| | | | ok deraadt@, kettenis@, jasper@
* Pass the symbol instead of its name when looking for CTF infos.mpi2017-05-293-12/+15
| | | | ok jasper@
* If a function is not found in the CTF data, do not assume it takes nompi2017-05-281-3/+3
| | | | argument.
* Merge two functions to lookup ELF sections by name.mpi2017-05-283-37/+12
| | | | ok claudio@, jasper@
* Make ddb print again filename and linenumber if a bsd.gdb was loaded.claudio2017-05-271-2/+2
| | | | mpi@ agrees that this is correct.
* Spring cleanup:mpi2017-05-271-151/+61
| | | | | | - Cache the string table pointer - Unify return statements - Use the end of the symbol table rather than counting symbols
* Use C99 types.mpi2017-05-091-13/+13
|
* Rename Debugger() into db_enter().mpi2017-04-301-2/+2
| | | | | | | Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
* Unifdef KGDB.mpi2017-04-301-4/+1
| | | | | | It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
* Add a port of witness(4) lock validation tool from FreeBSD.visa2017-04-201-1/+13
| | | | Go-ahead from kettenis@, guenther@, deraadt@
* Add routines for saving stack traces and printing saved tracesvisa2017-04-202-2/+25
| | | | | | on amd64 and i386. With guenther@
* Use ELF_ST_{BIND,TYPE} instead of ELFDEFNNAME(ST_{BIND,TYPE})guenther2017-02-082-9/+9
| | | | ok jca@