[Lldb-commits] [PATCH] D97165: [lldb] Add deref support and tests to shared_ptr synthetic

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 22 13:19:32 PST 2021


kastiglione added inline comments.


================
Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py:31
+        )
+        self.assertRegex(valobj.children[0].value, "^0x0{8,}$")
+
----------------
jingham wrote:
> If you used "unsigned" instead of "value" you'd get a number back and you could check that directly against 0x0 rather than having to do a regex match.  If you want to be careful, use GetValueAsUnsigned(fail_value=lldb.LLDB_INVALID_ADDRESS) since the default fail value is 0...
thanks, this is much nicer, I've fixed up the pointer asserts to check against the unsigned value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97165



More information about the lldb-commits mailing list