[Lldb-commits] [PATCH] D112180: Libcpp bitset syntethic children and tests

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 25 14:31:48 PDT 2021


wallace requested changes to this revision.
wallace added a comment.
This revision now requires changes to proceed.

almost there!



================
Comment at: lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp:20
 
-class BitsetFrontEnd : public SyntheticChildrenFrontEnd {
+// This class can be used for handling bitsets from both libcxx and libstdcpp.
+class GenericBitsetFrontEnd : public SyntheticChildrenFrontEnd {
----------------
Use `///` instead of `//`, that way it'll appear in the official documentation


================
Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/bitset/TestDataFormatterGenericBitset.py:32-35
         for i in range(size):
             child = var.GetChildAtIndex(i)
             self.assertEqual(child.GetValueAsUnsigned(), self.primes[i],
                     "variable: %s, index: %d"%(name, size))
----------------
What teemperor is saying is to something like:

  children = [ValueCheck(name="<something goes here>", summary='<same here>')]
  for i in range(size):
    children.append(
  valobj = self.expect_var_path(
            name,
            type="std::bitset<" + size + ">", # you might need to change this depending on the stdlib you use for each test
            children=children,
        )

  self.assertRegex(valobj.summary, r'^"hello"( strong=1)? weak=1$') # change this for the actual summary of the object


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112180



More information about the lldb-commits mailing list