kdb: Categorize kdb commands (similar to SysRq categorization)
This patch introduces several new flags to collect kdb commands into groups (later allowing them to be optionally disabled). This follows similar prior art to enable/disable magic sysrq commands. The commands have been categorized as follows: Always on: go (w/o args), env, set, help, ?, cpu (w/o args), sr, dmesg, disable_nmi, defcmd, summary, grephelp Mem read: md, mdr, mdp, mds, ef, bt (with args), per_cpu Mem write: mm Reg read: rd Reg write: go (with args), rm Inspect: bt (w/o args), btp, bta, btc, btt, ps, pid, lsmod Flow ctrl: bp, bl, bph, bc, be, bd, ss Signal: kill Reboot: reboot All: cpu, kgdb, (and all of the above), nmi_console Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:

committed by
Jason Wessel

parent
e8ab24d9b0
commit
9452e977ac
@@ -532,21 +532,28 @@ void __init kdb_initbptab(void)
|
||||
bp->bp_free = 1;
|
||||
|
||||
kdb_register_flags("bp", kdb_bp, "[<vaddr>]",
|
||||
"Set/Display breakpoints", 0, KDB_REPEAT_NO_ARGS);
|
||||
"Set/Display breakpoints", 0,
|
||||
KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS);
|
||||
kdb_register_flags("bl", kdb_bp, "[<vaddr>]",
|
||||
"Display breakpoints", 0, KDB_REPEAT_NO_ARGS);
|
||||
"Display breakpoints", 0,
|
||||
KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS);
|
||||
if (arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT)
|
||||
kdb_register_flags("bph", kdb_bp, "[<vaddr>]",
|
||||
"[datar [length]|dataw [length]] Set hw brk", 0, KDB_REPEAT_NO_ARGS);
|
||||
"[datar [length]|dataw [length]] Set hw brk", 0,
|
||||
KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS);
|
||||
kdb_register_flags("bc", kdb_bc, "<bpnum>",
|
||||
"Clear Breakpoint", 0, 0);
|
||||
"Clear Breakpoint", 0,
|
||||
KDB_ENABLE_FLOW_CTRL);
|
||||
kdb_register_flags("be", kdb_bc, "<bpnum>",
|
||||
"Enable Breakpoint", 0, 0);
|
||||
"Enable Breakpoint", 0,
|
||||
KDB_ENABLE_FLOW_CTRL);
|
||||
kdb_register_flags("bd", kdb_bc, "<bpnum>",
|
||||
"Disable Breakpoint", 0, 0);
|
||||
"Disable Breakpoint", 0,
|
||||
KDB_ENABLE_FLOW_CTRL);
|
||||
|
||||
kdb_register_flags("ss", kdb_ss, "",
|
||||
"Single Step", 1, KDB_REPEAT_NO_ARGS);
|
||||
"Single Step", 1,
|
||||
KDB_ENABLE_FLOW_CTRL | KDB_REPEAT_NO_ARGS);
|
||||
/*
|
||||
* Architecture dependent initialization.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user