diff options
author | Sam Leffler <sam@FreeBSD.org> | 2008-09-15 22:45:14 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2008-09-15 22:45:14 +0000 |
commit | 39297ba45528361278dc0522b99c659f3a38cbb8 (patch) | |
tree | 6a6cd52918de6f264f6071e5f55fc410c7f1633d /sys/kern/subr_pcpu.c | |
parent | ca3d37955c7c41e64a80c97b3f1c1fa4e9ff4897 (diff) | |
download | src-39297ba45528361278dc0522b99c659f3a38cbb8.tar.gz src-39297ba45528361278dc0522b99c659f3a38cbb8.zip |
Make ddb command registration dynamic so modules can extend
the command set (only so long as the module is present):
o add db_command_register and db_command_unregister to add and remove
commands, respectively
o replace linker sets with SYSINIT's (and SYSUINIT's) that register
commands
o expose 3 list heads: db_cmd_table, db_show_table, and db_show_all_table
for registering top-level commands, show operands, and show all operands,
respectively
While here also:
o sort command lists
o add DB_ALIAS, DB_SHOW_ALIAS, and DB_SHOW_ALL_ALIAS to add aliases
for existing commands
o add "show all trace" as an alias for "show alltrace"
o add "show all locks" as an alias for "show alllocks"
Submitted by: Guillaume Ballet <gballet@gmail.com> (original version)
Reviewed by: jhb
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=183054
Diffstat (limited to 'sys/kern/subr_pcpu.c')
-rw-r--r-- | sys/kern/subr_pcpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index d0fd0611f90c..e9fb8d0d1d81 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -155,7 +155,7 @@ DB_SHOW_COMMAND(pcpu, db_show_pcpu) show_pcpu(pc); } -DB_SHOW_COMMAND(allpcpu, db_show_cpu_all) +DB_SHOW_ALL_COMMAND(pcpu, db_show_cpu_all) { struct pcpu *pc; int id; @@ -169,4 +169,5 @@ DB_SHOW_COMMAND(allpcpu, db_show_cpu_all) } } } +DB_SHOW_ALIAS(allpcpu, db_show_cpu_all); #endif |