================ @@ -94,16 +94,11 @@ SBError SBWatchpoint::GetError() { int32_t SBWatchpoint::GetHardwareIndex() { LLDB_INSTRUMENT_VA(this); - int32_t hw_index = -1; - - lldb::WatchpointSP watchpoint_sp(GetSP()); - if (watchpoint_sp) { - std::lock_guard<std::recursive_mutex> guard( - watchpoint_sp->GetTarget().GetAPIMutex()); - hw_index = watchpoint_sp->GetHardwareIndex(); - } - - return hw_index; + // For processes using gdb remote protocol, + // we cannot determine the hardware breakpoint + // index reliably; providing possibly correct + // guesses is not useful to anyone. + return UINT32_MAX; ---------------- bulbazord wrote:
Instead of returning `UINT32_MAX`, can you return `-1` directly? To make it more clear. https://github.com/llvm/llvm-project/pull/72012 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits