Commit Graph

74 Commits

Author SHA1 Message Date
dbj 6a88e9174b add "show mount" ddb command 2003-11-18 18:26:18 +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
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
itojun f9121aada7 switch to use strlcpy() from libkern. 2003-05-16 16:28:30 +00:00
atatat b5329c1d85 (1) Don't print the message buffer (via ddb's dmesg command) if the
message buffer has not yet been set up, mimicking code from the top of
the sysctl routine for retrieving the message buffer.

(2) Add a /l modifier to the trace command.  This makes it print the
backtrace using printf() instead of db_printf(), which has the nice
side-effect of also putting it into the message buffer.  A kernel with
ddb in it but disabled (ie, ddb.onpanic set to zero) will print a
backtrace (which ends up in the message buffer) before dumping (or
not, depending on the value of kern.dump_on_panic) and rebooting, but
if ddb is not disabled, the backtrace is not printed, and there's no
way to get it to display a backtrace such that you can retrieve it
after the dump.  The backtrace printed by gdb is sometimes a little
different.

(3) Documentation for the above.
2003-05-15 13:18:18 +00:00
briggs e2391a87b6 Add a rudimentary 'trap to kgdb' command if KGDB is defined. This allows
systems with only one serial port for console, etc., to have at least some
basic access to remote-kgdb-over-serial, even if it is a bit awkward.
2003-04-28 02:49:54 +00:00
jmc 1ed82b5b2c Add a synonym for trace - 'bt' and document it 2003-02-13 23:50:33 +00:00
simonb bbd9776970 Remove variable that is only assigned too but not referenced. 2003-01-20 07:20:01 +00:00
scw a82718b34d Casting from a pointer, to a db_expr_t, has to go via an intptr_t.
(db_expr_t == int64_t on sh5, for example).
2002-08-26 11:34:27 +00:00
simonb 14ac06f0bd Add a "show event" ddb command to show the event counters. 2002-02-15 11:18:26 +00:00
simonb 4eaa4d66a8 ANSIfy, KNF.
Make some variables and functions static when not used outside of a module.
Make variables in headers extern.
Delete the unused db_find_watchpoint() function.
2002-02-15 07:33:48 +00:00
lukem 1ac69d9cb3 add RCSIDs 2001-11-12 22:54:03 +00:00
thorpej fae2a1befd Add `show malloc' to dump the internal state of the MALLOC_DEBUG code. 2001-08-17 01:00:10 +00:00
atatat 124ae5b65c Add an easy way to dump the message buffer from ddb. 2001-07-31 04:28:16 +00:00
matt 9086deaf4d Default to kernel_map if no addr is available. 2001-06-03 00:32:25 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
jhawk 35483d9169 alphabetize db_command tables 2001-02-11 21:12:24 +00:00
jdolecek 9818f641c3 make db_command_table[] const; since there is no way to dynamically extend
or modify the table at the moment, there is no functionality lost.
See also the discussion on tech-kern (Subject: 'machine' DDB command).
2001-01-24 20:54:41 +00:00
jdolecek 8b24036797 Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
2001-01-22 13:56:55 +00:00
enami 1199c16835 db_command_table needs to be writable at least when DB_MACHINE_COMMANDS
is defined.
2001-01-18 08:52:26 +00:00
jdolecek 9aa0a0185f constify a little 2001-01-17 19:50:03 +00:00
eeh 054819083c Restore the top level `callout' command. 2000-11-28 19:27:46 +00:00
chs 55a751c9d5 add ddb commands "show uvmexp" and "show ncache".
the former used to be "call uvm_dump", the latter is new.
2000-11-24 07:25:50 +00:00
sommerfeld 8951fce5df printf format safety 2000-07-08 17:10:22 +00:00
mrg f324eef2d2 remove include of <vm/vm.h> 2000-06-27 17:55:38 +00:00
jhawk a639b800ee In db_command(), fix indentation and add a missing db_skip_to_eol() which
previously caused the next command following a ","-style repitition
to not be properly executed.
2000-06-17 05:57:41 +00:00
sommerfeld cb31de55ed In the "reboot" and (badly misnamed) "sync" commands, clear db_recover
before calling cpu_reboot() (which never returns) so we can debug
faults occurring in cpu_reboot().
2000-06-10 16:31:42 +00:00
jhawk 74ee4f350f Only define db_show_arptab if NARP>1;
pointed out by cgd in kern/10314
2000-06-08 21:06:46 +00:00
jhawk b756e7384d Stop using DDB-specific "%n" kprintf() format specifier. This was
important as db_sym() can be called through printf() rather than
db_printf(), causing a trap as the standard %n usage is invoked.

The DDB-specific %n code should disappear from subr_prf.c soon...
2000-06-06 05:06:25 +00:00
sommerfeld bdc8251646 Change printing of cpu number in the prompt in the MULTIPROCESSOR case 2000-05-28 19:03:55 +00:00
jhawk 8e44b27348 Rename the machine-specific stack trace printing functions
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).

Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.

Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].

Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
2000-05-26 03:34:24 +00:00
thorpej 20c7af8a35 Fix a printf format. 2000-05-23 06:06:10 +00:00
jhawk 41ebaaaf09 Add a "sifting" command to ddb (named from the Sun OpenPROM command of
the same name); it searches the symbol table(s) for all symbols matching
a given substring, and prints.

Extremely useful for when you forget that critical symbol name.

Also, with /F support (cf. "ls -F") to print a char indicating the
symbol type.
2000-05-22 14:49:10 +00:00
jhawk ca31d672e2 Install "show arptab" (db_show_arptab) in the ddb command tree.
Move prototype from netinet/if_inarp.h to ddb/db_interface.h.
Change function to have standard ddb parameters (though they're
ignored).
2000-05-20 03:08:41 +00:00
jhawk cc732067b7 "p" should be an alias for "print", and was until "ps" was added.
Now it is, again.
2000-05-15 19:56:43 +00:00
jhawk a71de73182 From kern/9569.
Preserve ddb's idea of "count" from one command to the next if
repeating a command via hitting newline.
2000-04-13 22:48:29 +00:00
chs b937447204 actually add buf- and vnode-printing commands to the table. 2000-04-11 02:21:16 +00:00
chs 1c084aee4f add ddb commands for printing vnodes and bufs. 2000-04-10 02:22:13 +00:00
augustss 5e3d7e5317 Die, register, die! 2000-03-30 11:31:26 +00:00
sommerfeld ec2327108e On MP, print cpu number prior to prompt 2000-02-21 05:48:56 +00:00
jdolecek 8b2a23fb1a db_cmd_list(): variable ``width'' might have be used uninitialized, initialize
it to 0
1999-11-02 23:53:31 +00:00
lukem 4a2b49cb31 - change db_cmd_list() to list commands vertically rather than horizontally
- sort entries in the various command tables, so that the `help' lists
  are easier to use. this included hacking db_machine_commands_install()
  to search for the "machine" entry to change the `more cmds' pointer,
  rather than assuming it was the first entry
- add a `sync' command, which is effectively `reboot 0x100'.
- remove db_help_cmd(); it was unused (and was almost a duplicate of
  db_cmd_list()).
- move some extern decls to db_output.h, since they're used in more than one
  place now
- rename NEXT_TAB to DB_NEXT_TAB and move to db_output.h
1999-10-28 06:37:32 +00:00
thorpej 4b6d8943c2 Improve the pool allocator's diagnostic helpers, adding the ability to
log on a per-pool basis, reentrancy checking, and dumping various pool
information from DDB.
1999-05-10 21:13:05 +00:00
pk b13e5d1469 Quote "AS IS" as in the majority of Carnegy Mellon notices. 1999-04-12 20:38:17 +00:00
pk c40eb1cd97 Fix a pasto in copyright text which has been procreating like rabbits.. 1999-04-06 20:09:18 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
tron 870e46e9c4 Include required "opt_ddb.h" header file. 1998-07-05 14:33:56 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00