friss added inline comments.

================
Comment at: lldb/source/API/SBThread.cpp:328-329
       if (stop_info_sp) {
-        const char *stop_desc = stop_info_sp->GetDescription();
+        const char *stop_desc =
+            exe_ctx.GetThreadPtr()->GetStopDescription().data();
         if (stop_desc) {
----------------
This is wrong. `GetStopDescription()` returns a temporary `std::string`. 
`stop_desc` will be a dangling pointer on the next line. Just make `stop_desc` 
a `std::string` and call `.data()` below. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73303



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

Reply via email to