aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_print.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* ddb: add ability to print user registersmhorne2021-01-081-1/+23
| | | | | | | | | | | | | | | | | | | | The debugger is always entered after some kind of kernel trap, often a breakpoint in kdb_enter(). This means that the most recent trapframe will include kernel state at the time of the trap, when often it is desirable to the developer to view the contents of the previous trapframe. This trapframe often corresponds to the entry from userspace. The ddb(4) man page claims the ability to display user register state via the 'u' modifier to `show registers`, but this appears untrue. It is not obvious from a quick search of the history when this feature was added, or when it was removed. (Re)implement this feature in db_show_regs, noting that it is not necessarily populated with userspace state. Reviewed by: jhb (earlier version), markj, bcr (manpages) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27705
* SPDX: Consider code from Carnegie-Mellon University.Pedro F. Giffuni2017-11-301-0/+2
| | | | | | | Interesting cases, most likely from CMU Mach sources. Notes: svn path=/head/; revision=326403
* Various changes to the registers displayed in DDB for x86.John Baldwin2015-07-221-1/+2
| | | | | | | | | | | | | | | | | | | - Fix segment registers to only display the low 16 bits. - Remove unused handlers and entries for the debug registers. - Display xcr0 (if valid) in 'show sysregs'. - Add '0x' prefix to MSR values to match other values in 'show sysregs'. - MFamd64: Display various MSRs in 'show sysregs'. - Add a 'show dbregs' to display the value of debug registers. - Dynamically size the column width for register values to properly align columns on 64-bit platforms. - Display %gs for i386 in 'show registers'. Differential Revision: https://reviews.freebsd.org/D2784 Reviewed by: kib, markj MFC after: 2 weeks Notes: svn path=/head/; revision=285783
* ddb: finish converting boolean values.Pedro F. Giffuni2015-05-211-1/+1
| | | | | | | | | | | | The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved cleaning some type mismatches and ansifying old C function declarations. Pointed out by: bde Discussed with: bde, ian, jhb Notes: svn path=/head/; revision=283248
* ddb: space/tab fixes.Pedro F. Giffuni2014-10-111-1/+1
| | | | | | | | | No functional change. MFC after: 3 days Notes: svn path=/head/; revision=272958
* rev 1.54 of i386/include/pcb.h depended on sys/proc.h. The prerequisitePeter Wemm2005-04-141-0/+1
| | | | | | | | | | | was satisified for the rest of the kernel on the i386 build except for these two files. Rather than adding a submarine include to pcb.h, I've added proc.h here. I forgot to include these with the original commit. Sorry folks. Notes: svn path=/head/; revision=145053
* Start each of the license/copyright comments with /*-Warner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139747
* Mega update for the KDB framework: turn DDB into a KDB backend.Marcel Moolenaar2004-07-101-19/+19
| | | | | | | | | | | | | | | | | | | Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints. Notes: svn path=/head/; revision=131952
* Use __FBSDID().David E. O'Brien2003-06-101-2/+4
| | | | Notes: svn path=/head/; revision=116176
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Quiet warnings on Alpha. (db_expr_t is a long on alpha, int on x86)Peter Wemm1999-07-011-2/+2
| | | | Notes: svn path=/head/; revision=48407
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-271-3/+3
| | | | | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines. Notes: svn path=/head/; revision=43309
* Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.Bruce Evans1998-07-081-3/+3
| | | | Notes: svn path=/head/; revision=37506
* Fixed bogus type of valuep in struct db_variable. It was `int *' andBruce Evans1998-07-081-2/+3
| | | | | | | | became `long *' for alpha, but should always have been `db_expr_t *'. Fixed variable types to match. Notes: svn path=/head/; revision=37504
* Fixed db_printf format errors.Bruce Evans1998-07-081-3/+2
| | | | Notes: svn path=/head/; revision=37497
* Add initial support for the FreeBSD/alpha kernel. This is very much aDoug Rabson1998-06-101-2/+2
| | | | | | | | | | | | | work in progress and has never booted a real machine. Initial development and testing was done using SimOS (see http://simos.stanford.edu for details). On the SimOS simulator, this port successfully reaches single-user mode and has been tested with loads as high as one copy of /bin/ls :-). Obtained from: partly from NetBSD/alpha Notes: svn path=/head/; revision=36849
* Backed out previous commit, which just consisted of a 1-byte editingBruce Evans1998-06-081-2/+2
| | | | | | | error. Notes: svn path=/head/; revision=36747
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.Poul-Henning Kamp1998-05-281-27/+1
| | | | | | | | | | | | | | | | | | | | | | | Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde Notes: svn path=/head/; revision=36441
* Redo the previous commit in a more Bruce-friendly fashion.Poul-Henning Kamp1998-05-191-7/+3
| | | | | | | Urged by: bde Notes: svn path=/head/; revision=36197
* Add "show msgbuf" commandPoul-Henning Kamp1998-05-191-1/+31
| | | | Notes: svn path=/head/; revision=36181
* Removed unused #includes.Bruce Evans1997-06-141-3/+1
| | | | Notes: svn path=/head/; revision=26639
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* One missed printf in the debugger.Poul-Henning Kamp1996-01-211-2/+2
| | | | | | | Found By: bde Notes: svn path=/head/; revision=13533
* Reduced and cleaned up #includes.Bruce Evans1995-12-101-4/+1
| | | | Notes: svn path=/head/; revision=12734
* Untangled the vm.h include file spaghetti.David Greenman1995-12-071-1/+2
| | | | Notes: svn path=/head/; revision=12662
* Completed function declarations and/or added prototypes and/or #includesBruce Evans1995-11-241-2/+6
| | | | | | | | | | | | | to get the prototypes. Changed some `int's to `boolean_t's. boolean_t's are ints so they are hard to distinguish from ints. Converted function headers to old-style. ddb is written in K&R1 C except where we broke it. Notes: svn path=/head/; revision=12473
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-8/+8
| | | | Notes: svn path=/head/; revision=8876
* Makes gcc silent in sys/ddb.Poul-Henning Kamp1994-09-271-2/+1
| | | | Notes: svn path=/head/; revision=3140
* Fix up some sloppy coding practices:Garrett Wollman1994-08-181-3/+1
| | | | | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. Notes: svn path=/head/; revision=2112
* Change all #includes to follow the current Berkeley style. Some of theseGarrett Wollman1994-08-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make Notes: svn path=/head/; revision=2056
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andGarrett Wollman1993-11-251-3/+4
| | | | | | | add same (sans -Werror) to Makefile for future compilations. Notes: svn path=/head/; revision=798
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, someRodney W. Grimes1993-10-161-37/+2
| | | | | | | minor cleanup. Added $Id$ to files that did not have any version info, etc Notes: svn path=/head/; revision=623
* Initial import, 0.1 + pk 0.2.4-B1Rodney W. Grimes1993-06-121-0/+104
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=4