[lldb-dev] Break setting aliases...

Dave Lee via lldb-dev lldb-dev at lists.llvm.org
Wed Jul 22 09:57:00 PDT 2020

On Tuesday, July 21, 2020, Jim Ingham via lldb-dev <lldb-dev at lists.llvm.org>

> I think adding:
> bs (break source) -> break set -y
> ba (break address) -> break set -a
> bn (break name) -> break set -n
> would provide a convenient way to set the most common classes of
> breakpoints while not precluding access to all the other options available
> to “break set”.

If these are defined as regular aliases, I wonder how many people would
try, say, `bn -H whatever` and be confused when it doesn't work because it
didn't do the right thing (such as creating a breakpoint named "-H" in this
example). Should these new aliases support flags before and after the
positional argument? Personally I think so. But to support that, it seems
they'd need to be implemented with `command regex`. In that case, would it
be good to add similar before/after flag composition abilities to `b` as
Greg Clayton suggested?

It hasn't been mentioned in this thread, but `b` has undocumented handling
for flags: the prefix `b -` is expanded to `breakpoint set -`. Because of
this I almost never use `breakpoint set` directly. For whatever it's worth,
this means `bn` can be achieved as `b -n`, etc. As Pavel Labath suggested,
I think it's worth updating the help documentation for `b` to explicitly
lead users from `b` to `breakpoint set`.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200722/dec91a3b/attachment.html>

More information about the lldb-dev mailing list