aprantl added a comment. Just so I understand the limitations: This works for
int main() { int val = 0; // Break here val++; val++; return 0; } but not for int main() { { int val = 0; // Break here val++; val++; } { int other = 42; printf("assuming that other and val aliases"); } return 0; } ? To be clear, I think this is still useful! ================ Comment at: lldb/include/lldb/Breakpoint/Watchpoint.h:93 + struct WatchpointVariableContext { + WatchpointVariableContext(lldb::watch_id_t watch_id, ---------------- Doxygen comment? ================ Comment at: lldb/include/lldb/Breakpoint/Watchpoint.h:109 + + /// Callback routine which disable the watchpoint set on a variable when it + /// goes out of scope. ---------------- s/which/to/ ================ Comment at: lldb/source/Breakpoint/Watchpoint.cpp:86 +bool Watchpoint::SetupVariableWatchpointDisabler(StackFrameSP frame_sp) const { + ThreadSP thread_sp = frame_sp->GetThread(); ---------------- bulbazord wrote: > Should you also verify that the `frame_sp` you got isn't `nullptr`? If it'll > never be null, consider passing a `StackFrame &` instead. I subjectively feel like I've received a crash log for every single unchecked dereference in the LLDB code so far ;-) ================ Comment at: lldb/source/Commands/CommandObjectWatchpoint.cpp:973 } else { result.AppendErrorWithFormat( "Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRIu64 ---------------- Convert to early exit? 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