clayborg added inline comments.

================
Comment at: tools/lldb-mi/MICmdCmdVar.cpp:522
+      continue;
+
+    // Handle composite types (i.e. struct or arrays)
----------------
Or even cleaner:

```
bool CMICmdCmdVarUpdate::ExamineSBValueForChange(lldb::SBValue &vrwValue,
                                                 bool &vrwbChanged) {
  vrwbChanged = vrwValue.GetValueDidChange();
  if (vrwbChanged)
    return MIstatus::success;

  // Skip children of pointers and references to avoid infinite loop
  if (vrwValue.GetType().GetTypeFlags() & 
      (lldb::eTypeIsPointer | lldb::eTypeIsReference)) {
    return MIstatus::success;
  }

  const MIuint nChildren = vrwValue.GetNumChildren();
  for (MIuint i = 0; i < nChildren && !vrwbChanged; ++i) {
    ExamineSBValueForChange(vrwValue.GetChildAtIndex(i), vrwbChanged);
  }
  return MIstatus::success;
}```


https://reviews.llvm.org/D37154



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

Reply via email to