summaryrefslogtreecommitdiff
path: root/sys/ddb
AgeCommit message (Collapse)Author
2015-09-01initialise the width var in db_struct_offset_cmd()Jonathan Gray
ok miod@ deraadt@
2015-08-30Automatically perform traces upon panic. Shrink message aboutTheo de Raadt
reporting bugs to pointing at http://www.openbsd.org/ddb.html, because vertical space becomes more precious. ok beck krw kettenis
2015-08-12Use a linker script when building i386 kernels to allow section padding onMike Larkin
PAGE_SIZE boundaries. This is required to enforce proper separation of sections when adding page protections (coming shortly). This was in snaps before release with no reported side effects. ok deraadt@
2015-07-07Return correct file name entry from DWARF line tableMatthew Dempsky
We run the DWARF line table program to generate each row of the table until we find a row after the one we wanted, and then take the previous row's entries. The code correctly took the previous row's line number entry, but incorrectly took the current row's file name entry. Notably, this caused DDB to report the wrong file names for inlined calls to functions defined in header files. ok mlarkin
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
2015-04-29Also generate db_structinfo.txt with struct member offset and size infoPhilip Guenther
prodded by deraadt@ and miod@
2015-03-14restore systm.h, needed for strcmp. from Steven McDonaldTed Unangst
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@
2015-01-27remove #include <sys/workq.h>. it wont exist anymore soon.David Gwynne
2014-12-21Prevent writing to the kernel area via the direct map. We do this by paddingMike Larkin
the end of the kernel area to 2MB, so that the direct map pages can then have the W permission removed (X permission was already removed in a previous diff). This creates a VA hole at the end of bss, so adjust for that since that's where symbols get loaded by the bootloader (for now, map that region RO until the boot loader can be updated to place the symbols at "end" instead of "end of bss"). with help from and ok deraadt@
2014-12-19Use <sys/endian.h> instead of <machine/endian.h>Philip Guenther
ok dlg@ mpi@ bcook@ millert@ miod@
2014-12-19Remove an unused sys/hash.h include from db_structinfo.cReyk Floeter
(this file is only compiled with "option DDB_STRUCT"). ok guenther@
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
2014-10-09ddb: add support for DWARF line number decodingMatthew Dempsky
This allows ddb's "trace" command to include file and line numbers: ddb{0}> trace Debugger() at Debugger+0x9 [../../../../arch/amd64/amd64/db_interface.c:405] ddb_sysctl() at ddb_sysctl+0x1b4 [../../../../ddb/db_usrreq.c:104] sys___sysctl() at sys___sysctl+0x216 [../../../../kern/kern_sysctl.c:229] syscall() at syscall+0x297 [../../../../sys/syscall_mi.h:84] --- syscall (number 202) --- end of kernel end trace frame: 0x7f7ffffcf1d7, count: -4 acpi_pdirpa+0x4117aa: For this to work, it requires using a new version of boot(8), and booting a kernel with the .debug_line section present (e.g., building with ``makeoptions DEBUG="-g"'' and then booting the bsd.gdb kernel instead of the stripped bsd kernel). Still a WIP, but no failure reports yet. Committing so further development and testing can happen in tree. prodding deraadt, guenther, mlarkin ok mpi
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
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@
2014-07-11Add basic DWARF line table decoderMatthew Dempsky
Includes a stand-alone addr2line clone for userspace testing. Tested extensively on amd64 and expected to eventually support other architectures too. Importing now so further development/testing can happen in-tree. Followup commits will add to the kernel build and integrate into ddb. positive feedback; no objections
2014-07-08These do not need the extremely poorly named uvm/uvm_extern.h (whichTheo de Raadt
pulls in the universe). occasionally they need sys/systm.h
2014-05-29no more gcc2.Daniel Dickman
ok miod@
2014-03-24The kernel isn't involved in times(3); <sys/times.h> should never bePhilip Guenther
included there
2014-03-18Unbreak DDB_STRUCT after removal of agpio.hPhilip Guenther
2014-03-16DDB supports ELF symbols are all archs, and it's always the same as thePhilip Guenther
native size, so eliminate the #defines. ok miod@
2014-01-18Use arc4random_uniform to increase the slightly difficulty of winning.Theo de Raadt
Kidding, the fix is to stop using the scheduler's PRNG. ok kettenis
2013-12-13Remove the 4.3BSD tty(4) compatibility shims. RIP. ok millert@Christian Weisgerber
2013-12-12Add db_vprintf(), and then use it in ACPI's db_disprint() instead ofPhilip Guenther
formatting into a local buffer. ok miod@
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@
2013-10-19LP64 non-PMAP_DIRECT archs like sparc64 have a structure largerPhilip Guenther
than 65536 bytes, so make parse_structinfo.pl detect that and switch to u_int for sizes and offsets when that happens. ok miod@
2013-10-17Remove support for a.out and ecoff. We only do elf now.Theo de Raadt
ok miod
2013-10-15This has been rewritten in perl as parse_structinfo.plPhilip Guenther
ok miod@
2013-10-15Rewrite the awk script that generates the data for option DDB_STRUCT:Philip Guenther
- switch to perl for better data structures and (thus) speed - fix a couple glitches in the interpretation of the stabs output - compress the strings by putting them in one big array and overlaying suffixes - all sizes and offsets are <64k, so use u_short for them This results in ~60% reduction in the resulting text size and it now takes less than a second to create on fast platforms. ok miod@
2013-06-10If sysctl ddb.trigger=1 is not called from the console, the errorAlexander Bluhm
message "value is not available" was misleading. Use the ENODEV error to generate the more appropriate message "Operation not supported by device". Note that ddb.console must be set to 1 to see that error at all. OK mpf@
2013-03-15Delete the sequencer(4) driver, since its not used any longer. DiffAlexandre Ratchov
mostly from armani. ok miod, mpi, jsg and help from sthen
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2011-11-07When multiple display modifiers are specified on a ddb examine command, doMiod Vallat
not advance the address until the last modifier has been processed. This allows sequences like `x/xi address,count' to yield meaningful results. As a bonus, handle `i' and `I' modifiers last, so that I don't have to fight my habit of using `x/ix' instead of `x/xi'.
2011-05-22In ddb, when dereferencing a pointer, use sizeof a pointer.Ariane van der Steldt
Enables show map /f *kernel_map to succeed without nullpointer errors on 64-bit archs. ok miod@
2011-04-05- use nitems() no binary change on amd64Jasper Lievisse Adriaanse
"reads OK" claudio@
2011-04-03Allow kernel printfs to go to console if in ddb instead of being redirectedDale Rahn
to xconsole. ok deraadt@ guenther@
2010-11-27Get rid of the vm_map field of ddb breakpoints and watchpoints, and do notMiod Vallat
pretend these could work on userland addresses.
2010-11-27Remove ddb single-step load and store counters. Most platforms do notMiod Vallat
implement them, and they are of questionable usefulness.
2010-11-18Do not #include <sys/dkstat.h> if you don't need anything from it.Miod Vallat
ok krw@ deraadt@
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-09-08stray spaces no code changeMarco Peereboom
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-06-28<sys/time.b> is for ftime(), which is just in libcompat and not the kernel,Philip Guenthe
so stop including it in kernel .c files. "sure" deraadt@
2010-05-26Fallout from the proc.h include cleanup: proc.h must be included beforePhilip Guenthe
user.h ok deraadt@
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-11-21Fix `print $registername' on 64 bit platforms.Miod Vallat
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@