Commit Graph

16 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
0f59fbc3d6 MFp4 @178364:
Implement an optional delay to the ddb reset/reboot command.

This allows textdumps to be run automatically with unattended reboots
after a resonable timeout, while still permitting an administrator to
break into debugger if attached to the console at the time of the
event for further debugging.  Cap the maximum delay at 1 week to avoid
highly accidental results, and default to 15s in case of problems
parsing the timeout value.

Move hex2dec helper function from db_thread.c to db_command.c to make
it generally available and prefix it with a "db_" to avoid namespace
collisions.

Reviewed by:	rwatson
MFC after:	4 weeks
2010-05-24 16:41:05 +00:00
John Baldwin
93d4804b62 Initialize the DDB command list when initializing DDB so that the basic
commands are available from 'boot -d'.

Suggested by:	dfr
2008-09-25 19:50:14 +00:00
Robert Watson
c9b0cc3b96 Add a simple scripting facility to DDB(4), allowing the user to
define a set of named scripts.  Each script consists of a list of DDB
commands separated by ";"s that will be executed verbatim.  No higher
level language constructs, such as branching, are provided for:
scripts are executed by sequentially injecting commands into the DDB
input buffer.

Four new commands are present in DDB: "run" to run a specific script,
"script" to define or print a script, "scripts" to list currently
defined scripts, and "unscript" to delete a script, modeled on shell
alias commands.  Scripts may also be manipulated using sysctls in the
debug.ddb.scripting MIB space, although users will prefer to use the
soon-to-be-added ddb(8) tool for usability reasons.

Scripts with certain names are automatically executed on various DDB
events, such as entering the debugger via a panic, a witness error,
watchdog, breakpoint, sysctl, serial break, etc, allowing customized
handling.

MFC after:	3 months
2007-12-26 09:33:19 +00:00
Warner Losh
dd3cb56845 Start each of the license/copyright comments with /*- 2005-01-06 01:34:41 +00:00
Alfred Perlstein
14e10f9952 Remove __P. 2002-03-20 05:14:42 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
Bruce Evans
5ccbc3cc5a Reduced and cleaned up #includes. 1995-12-10 19:08:32 +00:00
Bruce Evans
4753168fae Completed function declarations and/or added prototypes.
Removed `extern' from prototypes.
Sorted prototypes.
Uniformized idempotency ifdefs.
1995-11-24 13:53:05 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Garrett Wollman
f23b4c91c4 Fix up some sloppy coding practices:
- 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.
1994-08-18 22:36:09 +00:00
Garrett Wollman
f540b1065a Change all #includes to follow the current Berkeley style. Some of these
``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
1994-08-13 03:50:34 +00:00
Garrett Wollman
6437fb2c06 Make all headers idempotent. All incorrect common data moved out of header
files and into a related source file.
1993-11-07 17:39:25 +00:00
Rodney W. Grimes
0edf66eca4 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 16:47:35 +00:00
Rodney W. Grimes
5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00