Skip to content

Commit 272fad4

Browse files
nir9Daniel Thompson
authored andcommitted
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>
1 parent 9131d6a commit 272fad4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

kernel/debug/kdb/kdb_bp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,15 @@ static int kdb_bc(int argc, const char **argv)
460460

461461
break;
462462
case KDBCMD_BE:
463+
if (bp->bp_enabled)
464+
break;
465+
463466
bp->bp_enabled = 1;
464467

465468
kdb_printf("Breakpoint %d at "
466-
kdb_bfd_vma_fmt " enabled",
469+
kdb_bfd_vma_fmt " enabled\n",
467470
i, bp->bp_addr);
468471

469-
kdb_printf("\n");
470472
break;
471473
case KDBCMD_BD:
472474
if (!bp->bp_enabled)

0 commit comments

Comments
 (0)