Re: [PATCH] kdb: Fix breakpoint enable to be silent if already enabled

From: Nir Lichtman
Date: Mon Oct 28 2024 - 16:38:04 EST


On Mon, Oct 28, 2024 at 11:38:00AM -0700, Doug Anderson wrote:
> On Sun, Oct 27, 2024 at 1:47 PM Nir Lichtman <nir@xxxxxxxxxxxx> wrote:
> >
> > 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.
>
> I don't ever use these commands (if I'm setting breakpoints them I'm
> using kgdb, not kdb), but this seems OK to me in general. I'm a little
> curious why you don't also make the "breakpoint clear" command
> consistent.
>

After looking deeper into this, reason this is not applicable for the "bc"
command is that after clearing the breakpoint, upon trying to clear it again,
an error will occur that says the breakpoint doesn't exist anymore hence this
logic is not applicable for "bc" which unlike "be"/"bd" completely clear out the bp

Thanks,
Nir

> -Doug