JDevlieghere added inline comments.

================
Comment at: lldb/source/Breakpoint/Watchpoint.cpp:127
+
+bool Watchpoint::VariableWatchpointDisabler(void *baton,
+                                            StoppointCallbackContext *context,
----------------
mib wrote:
> JDevlieghere wrote:
> > I think this should return an `llvm::Error` and log it at the call site. 
> > For every early return we know what went wrong. Same for 
> > `SetupVariableWatchpointDisabler`.
> This is a WatchpointCallback so it have to match a specific function 
> signature (and return a `bool`). I could change 
> `SetupVariableWatchpointDisabler` to return an `llvm::Error` in a follow-up
That's unfortunate but makes sense. Thanks for clarifying. 


================
Comment at: lldb/source/Breakpoint/Watchpoint.cpp:140
+
+  LLDB_LOGF(log, "Watchpoint::%s called by breakpoint %" PRIu64 ".%" PRIu64,
+            __FUNCTION__, break_id, break_loc_id);
----------------
mib wrote:
> JDevlieghere wrote:
> > Doesn't __FUNCTION__ already include `Watchpoint::`? Also I think there's a 
> > flag to include the function name in the log, so this is redundant. 
> No, it only prints the method name, `LLVM_PRETTY_FUNCTION` prints everything 
> but I think that macro is not defined with other compiler.
`LLVM_PRETTY_FUNCTION` is an llvm define, it expands to the appropriate macro 
based on the host compiler. You can totally use it but you must include 
`Compiler.h`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151366

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to