================
@@ -316,6 +316,11 @@ void CommandInterpreter::Initialize() {
AddAlias("continue", cmd_obj_sp);
}
+ // At this point, I'm leaving "b" command aliased to "_regexp-break".
There's
+ // a catch-all regexp in the command that takes any unrecognized input and
+ // runs it as `break set <input>` and switching the command to break add
+ // would change that behavior. People who want to use the break add for the
+ // "b" alias can do so in their .lldbinit.
----------------
jimingham wrote:
The first step is to add a way to deprecate an lldb command-line command, and
use it for the break set command once `break add` has gotten some airtime.
A deprecated command would not show up in "help" unless you explicitly dial up
the command. So `help break` wouldn't show `break set` but `help break set`
would show how to use it. `apropos` would also not search in deprecated
commands. And we'd issue a once per session type deprecation warning.
We'd also have to scrub the docs and replace "break set" with "break add".
At this point we should also swap the `b` alias.
Then once we've given folks a chance to switch over to `break add` we have to
make a policy decision:
Do we think it's okay to break scripts that people have that use `break set`?
If the answer to that is yes, then we say "release X will remove `break set` in
favor of `break add`" and in that release we remove the command and the
`_regexp-break` alias.
If we don't think that's okay, then we leave `break set` as it is. I don't
think it's worth trying to make `break set` route to `break add`, besides the
option parsing, they both end up calling the same underlying Target API's to
set the breakpoints. The translation would be if anything more fragile than
just keeping the old code around but just making it hard to get at.
If we go this route, we might want to have a periodic bot that switches the
`lldbutil.run_break_set_...` to use break set just so we don't break it
unknowingly.
I tried to make the transition from `break set` to `break add` as obvious as
possible, `break set -f` -> `break set file`, `break set -a` -> `break set
address` etc. And except when you're using `_regexp-break` to run
not-specifically-handled `break set` commands, the use of `b` is identical. So
coping with the change shouldn't be particularly difficult. I am in general
pretty reluctant to change things that folks rely on but I think we probably
could get away with swapping `add` for `set` after an appropriate interval for
overwriting muscle memory and dealing with scripts.
But that's something we should do as a Discourse topic and let other people
chime in before we make a final decision.
https://github.com/llvm/llvm-project/pull/171236
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits