types of changes:
- Add a few new methods to replace stuff like p_find(), CPU_INFO_FOREACH.
- Use db_read_bytes() instead of accessing kernel structures directly,
and similar changes.
- Add ifdef _KERNEL where the above hasn't been done, and an XXX comment.
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.
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...
pointer indicating how to print the symbol. This allows db_printsym()
to called in places where db_printf() is not an appropriate output
function.
While straightforward, apologies in advance if I've introduced any minor
syntax errors; I was unable to test compilation this on all the affected
platforms.