kernel_optimize_test/kernel/debug/kdb
Douglas Anderson bbfceba15f kdb: Get rid of confusing diag msg from "rd" if current task has no regs
If you switch to a sleeping task with the "pid" command and then type
"rd", kdb tells you this:

  No current kdb registers.  You may need to select another task
  diag: -17: Invalid register name

The first message makes sense, but not the second.  Fix it by just
returning 0 after commands accessing the current registers finish if
we've already printed the "No current kdb registers" error.

While fixing kdb_rd(), change the function to use "if" rather than
"ifdef".  It cleans the function up a bit and any modern compiler will
have no trouble handling still producing good code.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20191109111624.5.I121f4c6f0c19266200bf6ef003de78841e5bfc3d@changeid
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2020-01-31 17:34:03 +00:00
..
.gitignore
kdb_bp.c
kdb_bt.c kdb: Gid rid of implicit setting of the current task / regs 2020-01-31 17:34:00 +00:00
kdb_cmds
kdb_debugger.c kdb: Don't back trace on a cpu that didn't round up 2018-12-30 08:31:23 +00:00
kdb_io.c kdb: Tweak escape handling for vi users 2019-10-28 12:08:29 +00:00
kdb_keyboard.c kdb: kdb_keyboard: mark expected switch fall-throughs 2018-11-13 20:38:50 +00:00
kdb_main.c kdb: Get rid of confusing diag msg from "rd" if current task has no regs 2020-01-31 17:34:03 +00:00
kdb_private.h kdb: Gid rid of implicit setting of the current task / regs 2020-01-31 17:34:00 +00:00
kdb_support.c kdb: kdb_support: replace strcpy() by strscpy() 2019-05-02 13:42:01 +01:00
Makefile kdb: Get rid of broken attempt to print CCVERSION in kdb summary 2019-05-12 09:50:43 +01:00