clayborg added inline comments.

================
Comment at: lldb/tools/lldb-vscode/JSONUtils.cpp:143
+    llvm::StringRef value = v.GetValue();
+    llvm::StringRef summary = v.GetSummary();
+    llvm::StringRef type_name = v.GetType().GetDisplayTypeName();
----------------
yinghuitan wrote:
> Sorry for the late comment. The fix is fine but it depends on an important 
> assumption that GetError() has to be called before GetSummary(). Can we add 
> an explicit comment to document this so that future refactoring won't violate 
> it again.
We shouldn't, we need to fix this API bug in LLDB itself. Just calling 
SBValue::GetError() shouldn't end up clearing the m_summary_str IMHO. This 
seems like the real bug. This is working around this. IF we add a comment, it 
won't end up being true when we fix the issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136890

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

Reply via email to