ad
9f19801f75
add boilerplate missed in initial commit
2009-04-10 22:29:30 +00:00
reinoud
49f0ea0bd0
KGDB does no longer refers to ddb/db_access. Fixes compilation problems of KGDB
...
kernels.
2009-03-31 15:50:45 +00:00
ad
912b4160fd
Make 'show event', 'dmesg' work with crash(8).
...
XXX dmesg fails exactly the same way as /sbin/dmesg.
2009-03-21 13:06:39 +00:00
dsl
454af1c0e8
Change about 4500 of the K&R function definitions to ANSI ones.
...
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8
Remove all the __P() from sys (excluding sys/dist)
...
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
martin
7d53797861
Switch the default value (if no options DDB_ONPANIC is defined) for
...
ddb.onpanic to 1, change it back to 0 in sysctl.conf and make sure
postinstall installs this setting.
This avoids us trying to dump while booting from install CD, but keeps
the default the same once we are far enough through /etc/rc.d. Failing
earlier is unlikely to be recovered by an automatic reboot.
OK: core.
2009-03-11 23:22:57 +00:00
nakayama
3a99fdb328
Avoid "warning: cast from pointer to integer of different size"
...
on 32-bit sparc64 kernels.
2009-03-11 13:29:44 +00:00
mrg
d2ea53a056
include <stdbool.h> if not _KERNEL, and don't include kauth.h if _KERNEL.
...
now crash builds on i386.
2009-03-09 06:07:05 +00:00
mrg
e4d97b1066
include <sys/user.h>
2009-03-08 11:41:47 +00:00
mrg
4540375faf
include ddb headers *after* sys/types.h or sys/param.h.
2009-03-08 11:40:00 +00:00
ad
cd6b1c8f08
Make ddb compile and work in userspace. Mostly this is comprised of three
...
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.
2009-03-07 22:02:16 +00:00
haad
87b8a8844f
Do not set last_count to zero after every db_command function call it is
...
static variable. This should fix PR 40712.
2009-03-01 12:13:12 +00:00
yamt
f68e4571e5
- fix vmem unittest. rename VMEM_DEBUG so that it won't be abused again.
...
- reimplement vmem sanity checks with less code duplication.
- reimplement ddb vmem-related commands in a more consistent ways.
remove automatic whatis.
2009-02-18 13:31:59 +00:00
ad
563a207d33
Default 'show all procs' to /l. People tend to type 'ps' without modifiers
...
when providing information about deadlocks. Without the thread info it's
not very useful.
2009-02-04 20:17:58 +00:00
ad
6e89a762d6
Default DDB_ONPANIC to zero. The end product is ultimately for the
...
consumption of users external to the project, users who are unlikely to
be kernel hackers with the motivation to debug crashes. In this situation
rebooting and creating a crash dump is more appropriate than interrupting
normal service for an unbounded amount of time, while also leaving the
machine at cryptic db> prompt.
2009-01-30 21:30:56 +00:00
haad
128703a537
Fix my bug introduced in rev 1.98 of db_command.c where command prefix
...
not ambiguous in one table was choosed even if it was ambiguous in another
table in same list. Also apply more KNF rules.
Patch was supplied by uwe@.
2009-01-05 22:19:40 +00:00
cegger
10de0e2b14
ddb: new 'show vmem' and 'show all vmems' commands.
...
Useful to inspect vmem(9) structures.
2008-12-07 00:51:15 +00:00
martin
719a906ef5
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
...
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
nakayama
4cb83f9c6e
Make DDB shows right register values on 32-bit sparc64 kernels.
...
- define db_expr_t as int64_t.
- %gsr is 32-bit, so use db_sparc_intop.
- sync arguments with function prototype.
- ansify.
2008-11-25 15:41:11 +00:00
ad
31afc5b6d8
Add some basic DDB stuff for modules.
2008-11-25 15:14:07 +00:00
pooka
010ce4930e
more <sys/buf.h> police
2008-11-16 19:34:29 +00:00
ad
13de59a192
ifdef AIO
2008-11-14 23:37:50 +00:00
ad
9b83143a6a
+ifdef AIO
...
XXX ddb needs a way to register commands at runtime!
2008-11-14 23:37:30 +00:00
christos
bc44c7d780
don't hold locks in ddb (call ksyms_getval_unlocked()), pointed out by ad.
2008-10-24 13:55:42 +00:00
rmind
97561001a3
Replace more intptr_t to uintptr_t when casting VA.
2008-10-03 14:52:11 +00:00
rmind
03fe669395
- Fix message queue permissions problems.
...
- Rake into account umask when creating mqueue.
- Restore DDB command, which was accidentally lost (hi martin).
- Misc.
2008-09-29 10:27:53 +00:00
skrll
3ceaf8f8e4
Make "show uvmhist" available to all arches (not just sparc*) in ddb.
2008-08-08 17:09:28 +00:00
blymn
a7db4edf3b
Take care not to dereference NULL datapointer from fd table
...
Make output more readable and label what lock we are examining.
2008-07-14 10:15:11 +00:00
blymn
380be0c111
Fix indents.
2008-07-10 13:28:23 +00:00
blymn
8a19e9911c
Add a show files command that prints the vnodes associated with a
...
given struct proc and, if LOCKDEBUG is built in, the lock status of
the uvmobject.
2008-07-10 12:42:24 +00:00
blymn
8070795214
Whitespace clean up.
2008-07-10 12:38:28 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
uwe
aece9113ff
Fix CS_MACH definition. 0x10 is spelled 0x10, not 0x16.
2008-03-27 01:15:15 +00:00
uwe
cff5aa6f0d
Fix help string for "w" - it is "write" not "watch".
2008-02-21 02:07:45 +00:00
martin
d5ed42ea19
When doing a reboot from ddb, set panicstr, so that later LOCKDEBUG checks
...
show the same mercy as with a real panic.
2008-02-02 18:16:42 +00:00
perry
b6a2ef7569
Convert many of the uses of __attribute__ to equivalent
...
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
yamt
0c38201391
add ddb "whatis" command. inspired from solaris ::whatis dcmd.
2007-12-13 02:45:09 +00:00
ad
8838af190c
ps/w: display LWP info.
2007-12-02 19:35:33 +00:00
martin
e6116bac33
Add a missing "else". Should finally fix PR kern/37110.
2007-11-14 12:05:42 +00:00
martin
bb436049fc
Pacify some gcc uninitialized warnings at -O3
2007-10-22 00:36:28 +00:00
ad
a2a3828545
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
2007-10-19 11:59:34 +00:00
uwe
85dcbb2bb9
db_cmd_search: When we compare names we'd better stop at the nul byte.
...
Don't flip-flop between found and ambiguous. (hi, martin!)
2007-10-14 00:37:56 +00:00
martin
28da38cbee
Fix command name matching, avoid jumps to null function pointers and
...
some minor cosmetics.
2007-10-12 09:53:07 +00:00
martin
cd2cd2dd63
Do another setjmp right before entering the command loop, we do not want
...
to execute the on-enter commands again on errors.
2007-10-08 15:06:26 +00:00
martin
9b58206ecf
Some cleanup:
...
- When registering command tables, make sure the builtin commands are
already registered
- Make the command table entry structure private
- Do not bother to store the number of commands in a table, we can quickly
calc that if needed.
2007-10-02 08:47:26 +00:00
martin
cadfc6aaa0
No need to db_init_commands() early any more - it will happen on first
...
entry to ddb.
2007-10-01 22:05:15 +00:00
martin
463076317b
Special case the initialization of builtin command tables to avoid using
...
malloc. Fixes PR kern/37042.
Allow "mach" commands registered by LKMs even if there is no builtin
mach command for the arch.
2007-10-01 22:01:38 +00:00
martin
34bb6e19fd
Minor clenaup - db_cmd_loop_done is a bool nowadays, so use true/false
...
instead of 0/1.
Also make db_init_commands() non-static.
2007-09-23 23:55:54 +00:00
martin
99423a9d7c
Simplify the "tables are already setup" test.
...
Print a message on unknown commands (as we used to do before) and get rid
of the now unused macro previously used for that.
2007-09-23 19:51:20 +00:00
martin
ad21af77ef
Fix build for archs w/o DB_MACHINE_COMMANDS.
...
Patch from KIYOHARA Takashi.
2007-09-23 18:59:23 +00:00