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.
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.
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.
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...
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.
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.
- 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