summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNir Lichtman <nir@lichtman.org>2024-10-27 20:47:29 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2024-11-02 08:41:39 +0000
commit272fad470b6548d8f9fb293a3fc6918c9d053d91 (patch)
tree82499f37c9d5fd39477599af1895f76a579ef9ea
parent9131d6a7a726d7a372bc35d27df9ebe3f011508e (diff)
kdb: Fix breakpoint enable to be silent if already enabled
Fix the breakpoint enable command (be) to a logic that is inline with the breakpoint disable command (bd) in which if the breakpoint is already in an enabled state, do not print the message of enabled again to the user. Also a small nit fix of the new line in a separate print. Signed-off-by: Nir Lichtman <nir@lichtman.org> Link: https://lore.kernel.org/r/20241027204729.GA907155@lichtman.org Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r--kernel/debug/kdb/kdb_bp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c
index 372025cf1ca3..c0c2072f5452 100644
--- a/kernel/debug/kdb/kdb_bp.c
+++ b/kernel/debug/kdb/kdb_bp.c
@@ -460,13 +460,15 @@ static int kdb_bc(int argc, const char **argv)
break;
case KDBCMD_BE:
+ if (bp->bp_enabled)
+ break;
+
bp->bp_enabled = 1;
kdb_printf("Breakpoint %d at "
- kdb_bfd_vma_fmt " enabled",
+ kdb_bfd_vma_fmt " enabled\n",
i, bp->bp_addr);
- kdb_printf("\n");
break;
case KDBCMD_BD:
if (!bp->bp_enabled)