[Lldb-commits] [PATCH] D149111: [lldb] Add support for specifying language when setting watchpoint by expression

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 25 14:19:34 PDT 2023


bulbazord requested review of this revision.
bulbazord added a comment.

In D149111#4296670 <https://reviews.llvm.org/D149111#4296670>, @mib wrote:

> I think we should still be able to use this new flag with the previous ones (i.e. `watchpoint set -l c++ -w read -- &my_var`)

You can do that still with this patch. I'm placing the language flag in a 2nd group so that `watchpoint set variable` does not have access to this flag, but `watchpoint set expression` does. You can still mix and match the flags for `expression`.



================
Comment at: lldb/source/Interpreter/OptionGroupWatchpoint.cpp:67
+     "Number of bytes to use to watch a region."},
+    {LLDB_OPT_SET_2,
+     false,
----------------
mib wrote:
> bulbazord wrote:
> > jasonmolenda wrote:
> > > I don't care much, but the formatting of this entry is pretty inconsistent with the two SET_1's above.  Should they match?
> > I applied clang-format to the entire thing and this is what it gave me.... /shrug
> Having a different option group for this flag means it can't be used with the other ones ... Is that really what you want ?
`OptionGroupWatchpoint` as far as I can tell is only used for `watchpoint set expression` and `watchpoint set variable`. I don't think this flag makes sense for `watchpoint set variable`, so I'm adding it to the 2nd group for expression and opting out for variable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149111/new/

https://reviews.llvm.org/D149111



More information about the lldb-commits mailing list