This patch restores the capability for providing help with the PS and BT arguments.
Cc: Anton Vorontsov <anton.voront...@linaro.org> Cc: Sasha Levin <sasha.le...@oracle.com> Cc: Rusty Russell <ru...@rustcorp.com.au> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Reviewed-by: Dimitri Sivanich <sivan...@sgi.com> Signed-off-by: Mike Travis <tra...@sgi.com> --- kernel/debug/kdb/kdb_main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) --- linux.orig/kernel/debug/kdb/kdb_main.c +++ linux/kernel/debug/kdb/kdb_main.c @@ -2787,6 +2787,32 @@ static int kdb_grep_help(int argc, const } /* + * display help for the ps and bt status flag + */ +static int kdb_ps_help(int argc, const char **argv) +{ + kdb_printf("The meaning of the State flag in ps command output:\n"); + kdb_printf(" R RUNNING\n"); + kdb_printf(" D TASK_UNINTERRUPTIBLE\n"); + kdb_printf(" S TASK_INTERRUPTIBLE\n"); + kdb_printf(" T TASK_STOPPED\n"); + kdb_printf(" C TASK_TRACED\n"); + kdb_printf(" Z EXIT_ZOMBIE\n"); + kdb_printf(" E EXIT_DEAD\n"); + kdb_printf(" U UNRUNNABLE\n"); + kdb_printf(" M sleeping DAEMON\n"); + kdb_printf(" I IDLE\n"); + kdb_printf(" (note that most idles are named 'kworker/NN')\n"); + kdb_printf("\n"); + kdb_printf( + "The above can be specified to ps and bta to select tasks\n"); + kdb_printf(" A all of above\n"); + kdb_printf(" default is RDSTCZEU (not Idle or sleeping Daemon)\n"); + return 0; +} + + +/* * kdb_register_repeat - This function is used to register a kernel * debugger command. * Inputs: @@ -2972,6 +2998,8 @@ static void __init kdb_inittab(void) "Enter kgdb mode", 0, KDB_REPEAT_NONE); kdb_register_repeat("ps", kdb_ps, "[<flags>|A]", "Display active task list", 0, KDB_REPEAT_NONE); + kdb_register_repeat("pshelp", kdb_ps_help, "", + "Display help for the ps and bt task State flag", 0, KDB_REPEAT_NONE); kdb_register_repeat("pid", kdb_pid, "<pidnum>", "Switch to another task", 0, KDB_REPEAT_NONE); kdb_register_repeat("reboot", kdb_reboot, "", -- ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport