Commit 272fad47 authored by Nir Lichtman's avatar Nir Lichtman Committed by Daniel Thompson
Browse files

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: default avatarNir Lichtman <nir@lichtman.org>
Link: https://lore.kernel.org/r/20241027204729.GA907155@lichtman.org


Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
parent 9131d6a7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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)