[Lldb-commits] [PATCH] D144238: [lldb] StructuredData should not truncate uint64_t values

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 16 18:41:02 PST 2023


mib added a comment.

Should we also add a negative integer to the dictionary to make sure this didn't cause a regression ?



================
Comment at: lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py:25
         s.Print(
-            "{\"key_dict\":{\"key_string\":\"STRING\",\"key_int\":3,\"key_float\":2.99,\"key_bool\":true,\"key_array\":[\"23\",\"arr\"]}}")
+            "{\"key_dict\":{\"key_string\":\"STRING\",\"key_uint\":18446744069414584320,\"key_float\":2.99,\"key_bool\":true,\"key_array\":[\"23\",\"arr\"]}}")
         example = lldb.SBStructuredData()
----------------
Ditto (hex)


================
Comment at: lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py:130
+        output = uint_struct.GetIntegerValue()
+        if not output == 18446744069414584320:
             self.fail("wrong output: " + str(output))
----------------
nit: I think the hex representation would be cleaner.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144238



More information about the lldb-commits mailing list