Commit Graph

296 Commits

Author SHA1 Message Date
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
uwe 40ada7179f ANSIfy db_error. 2006-09-05 21:56:44 +00:00
uwe 7c918c612d Mark db_error __attribute__((__noreturn__)). 2006-09-05 21:52:11 +00:00
christos f9f4c63527 fix incomplete initializer. 2006-08-30 00:00:15 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
he 34b3f04168 Move declaration up ahead of active code in the function, so that
this can be built again with gcc 2.95.3, as used by vax.
2006-05-14 14:00:17 +00:00
christos 103d2f520c XXX: GCC uninitialized. 2006-05-14 05:30:31 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
christos 0830ad8bf0 Coverity CID 1094: Protect against NULL deref. 2006-04-14 22:06:41 +00:00
he f2b7814ebc Now that BKPT_SET takes two arguments, supply the second argument. 2006-04-02 00:57:30 +00:00
bjh21 ed2f09f139 Add a "show all pages" command to DDB which prints one line per physical
page in the system.  Useful for getting some idea where all your memory's
gone, at least on a sufficiently small system.
2006-02-19 18:52:29 +00:00
yamt e8a3b3eb83 add ddb "sh mbuf" command. 2006-01-24 13:02:57 +00:00
uwe adcd5c2d11 db_show_sched_qs: fix pointer cast lint considers troublesome. 2006-01-22 01:08:50 +00:00
uwe 19707b27a5 Add /l to show all procs usage. 2006-01-22 00:50:51 +00:00
uwe 91321511a9 This is not IOCCC. Replace " >"[cp == p] with conditional expression.
Makes lint happy.  Probably generates better code too (does on sh3).
2006-01-22 00:47:50 +00:00
uwe 0df816cb4b Add CONSTCOND to DB_EXPR_T_IS_QUAD. 2006-01-21 01:11:43 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he 1067be953e After addition of "show all pools", we now need <sys/pool.h> here.
Fixes build problem for mac68k.
2005-12-03 22:47:25 +00:00
yamt a004e1d63c add "show all pools" command for ddb. 2005-12-01 13:21:05 +00:00
thorpej 3a29afcd5e Move DDB files to files.ddb
XXX couple of kgdb references -- clean up later
2005-11-27 22:44:35 +00:00
yamt 3afdabd868 make DDB_COMMANDONENTER sysctl. (ddb.commandonenter)
suggested by Christos Zoulas.
2005-11-27 13:05:28 +00:00
yamt ac41acf302 add a new option DDB_COMMANDONENTER.
which can be useful for eg. broken console input.
2005-11-26 12:16:44 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
drochner 7005d4ef81 make the argument of db_write_bytes const (sorry for the signature change) 2005-06-01 15:57:23 +00:00
drochner 4d205d8853 more constification fallout 2005-06-01 12:25:27 +00:00
jhawk a74233676c minor updates: vax port kludge is in trace, not kill. spelling.
no 0t output in ps.
2005-05-30 05:58:52 +00:00
christos 02e608f6b8 Add lots of const. 2005-05-29 21:31:05 +00:00
yamt 8ca4d66b5e move decl of db_machine_command_table from db_interface.h to db_command.c
to avoid an array of incomplete type.  found by gcc4.
2005-04-29 10:40:16 +00:00
christos 23b9ddb316 remove stray error(1) comment. 2005-03-28 01:05:13 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
cube 9367bbf87b The way I handled /dev/ksyms requests vs. kernel requests was completely
broken.  Inside the kernel, we always have to use the real values of the
st_name fields, and only do the math when the request comes from userland.

No need for ksyms_getval_from{kernel,userland} hack anymore.  However, a
different version will be asked for pull-up in -2{,-0}, one that doesn't
break the API, that is.

Fixes PR#29133 from Jens Kessmeier.
2005-02-15 21:09:57 +00:00
chs bb5a198f3d reduce db_maxoff from 256MB to 1MB, that should be plenty. 2005-01-16 23:38:47 +00:00
reinoud 22f1132820 Implement ddb setting that allows all ddb output to be teed into the
kernel message buffer/log. Its off by default and can be switched on in the
kernel configuration on build time, be set as a variable in ddb and be set
using sysctl.

This adds the sysctl value
	ddb.tee_msgbuf = 0
by default.

The functionality is especially added and aimed for developers who are not
blessed with a serial console and wish to keep all their ddb output in the
log. Specifying /l as a modifier to some selected commands will also put
the output in the log but not all commands provide one nor has the same
meaning for all commands.

This feature could in the future also be implemented as an ddb command but
that could lead to more bloat allthough maybe easier for non developpers to
use when mailing their backtraces from kernel crashes.
2004-09-29 23:54:11 +00:00
reinoud 8faf51b906 Note that point 32 (ddb output to msgbuf) is Work In Progress and is about
to be committed after more testing and cleanup/review.
2004-09-28 23:02:58 +00:00
reinoud ce5f43b0de Add an item to help developers without serial consoles. 2004-09-28 19:54:27 +00:00
nathanw 0ac1c38100 Make ddb's "show sched_qs" aware of big-endian sched_qs arrangements. 2004-07-27 02:15:07 +00:00
atatat d37080bc2f Sysctl descriptions under ddb subtree 2004-05-25 04:31:48 +00:00
atatat 1ee5d694aa That's not supposed to be there. Sorry. 2004-04-27 04:03:28 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
dbj 6a88e9174b add "show mount" ddb command 2003-11-18 18:26:18 +00:00
cube d3730f1c68 o Fix a bug in ksyms that changed the real meaning of st_name entries for
symbols, and made it impossible for the kernel to use that value, and
  correctly find symbols from LKMs.
o Allow LKM users to use DDB to debug the entry function of a LKM by
  loading the symbol table with the temporary name /lkmtemp/ before calling
  it, and then renaming it once we know the module name.

Approved by ragge@.
2003-11-17 10:16:18 +00:00
scw c55851c88b Fix format string warnings for platforms where
sizeof(db_addr_t) > sizeof(long). e.g. ILP32 on sh5.
2003-11-09 20:52:18 +00:00
christos fe659fa011 fix uninitialized variable 2003-10-25 08:48:11 +00:00
chs d2266994e2 add "b" as a synonym for "break", since someone added "bt"
and made "b" an ambiguous prefix.
2003-10-10 15:21:24 +00:00
scw 5efdd1f9f3 Tweak the previous change to ensure symbol addresses are correctly
sign-extended on cpus with 64-bit registers.
2003-10-05 11:17:47 +00:00
thorpej c7a178e4a9 Add a "show sched_qs" command to dump the run queues. Format is:
1	pid.lid (p_comm)
	pid.lid (p_comm)
 ...

If a queue has procs, but no sched_whichqs bit, it shows:
!1	pid.lid (p_comm)
2003-09-20 03:02:03 +00:00