================
@@ -1093,22 +1097,30 @@ class CommandObjectWatchpointSetExpression : public 
CommandObjectRaw {
     }
 
     Status error;
-    WatchpointSP watch_sp =
-        target.CreateWatchpoint(addr, size, &compiler_type, watch_type, error);
-    if (watch_sp) {
-      watch_sp->SetWatchSpec(std::string(expr));
-      Stream &output_stream = result.GetOutputStream();
-      output_stream.Printf("Watchpoint created: ");
-      watch_sp->GetDescription(&output_stream, lldb::eDescriptionLevelFull);
-      output_stream.EOL();
-      result.SetStatus(eReturnStatusSuccessFinishResult);
-    } else {
-      result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" 
PRIx64
-                                   ", size=%" PRIu64 ").\n",
-                                   addr, (uint64_t)size);
-      if (error.AsCString(nullptr))
-        result.AppendError(error.AsCString());
+    WatchpointSP watch_sp;
+    watch_sp =
----------------
dlav-sc wrote:

If you are asking about `WatchpointSP watch_sp;`, then I myself don't know why 
this line is placed separately :) It seems I changed this lines several times.

Fixed it.

https://github.com/llvm/llvm-project/pull/159807
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to