[Lldb-commits] [lldb] [lldb] Support new libc++ __compressed_pair layout (PR #96538)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 11 04:58:22 PDT 2024


================
@@ -254,6 +256,29 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::
     Update();
 }
 
+llvm::Expected<uint32_t>
+lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::
+    CalculateNumChildrenForOldCompressedPairLayout() {
+  ValueObjectSP node_sp(m_tree->GetChildMemberWithName("__pair3_"));
+  if (!node_sp)
+    return 0;
+
+  // TODO: or should this just be: assert
+  // (!isOldCompressedPairLayout(*node_sp));
----------------
labath wrote:

I don't think so, as this could also be triggered by a some change in libc++, missing/corrupted debug info, etc.

https://github.com/llvm/llvm-project/pull/96538


More information about the lldb-commits mailing list