haikuwebkit/Tools/lldb
Alex Christensen 1a9227ba6a REGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap
https://bugs.webkit.org/show_bug.cgi?id=207204

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-15
Reviewed by Simon Fraser.

Source/WTF:

* wtf/HashTable.h:

Tools:

In r255780 I removed WebKit LLDB support for HashTables because the LLDB python API doesn't have a way to
do the equivalent of reinterpret_cast.  With clever use of a union, I can get a pointer to the table and
tell LLDB it is actually a pointer to an unsigned integer array.  Then, using pointer->unsigned->pointer
transformations I can dereference a negative index.  It's gross, but it works and makes the tests pass again.

* lldb/lldb_webkit.py:
(__lldb_init_module):
(__lldb_init_module.lldb_webkit):
(WTFHashTable_SummaryProvider):
(WTFHashMap_SummaryProvider):
(WTFHashSet_SummaryProvider):
(WTFHashMapProvider):
(WTFHashMapProvider.__init__):
(WTFHashMapProvider.tableSize):
(WTFHashMapProvider.keyCount):
(WTFHashSetProvider):
(WTFHashSetProvider.__init__):
(WTFHashSetProvider.tableSize):
(WTFHashSetProvider.keyCount):
(WTFHashTableProvider):
(WTFHashTableProvider.__init__):
(WTFHashTableProvider.metadataWithIndex):
(WTFHashTableProvider.tableSize):
(WTFHashTableProvider.keyCount):
(WTFHashTableProvider.num_children):
(WTFHashTableProvider.get_child_index):
(WTFHashTableProvider.get_child_at_index):
(WTFHashTableProvider.update):
(WTFHashTableProvider.has_children):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):

Canonical link: https://commits.webkit.org/235319@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-16 03:54:53 +00:00
..
lldbWebKitTester More FALLBACK_PLATFORM adoption 2020-12-04 19:51:39 +00:00
dump_class_layout_unittest.py
lldb_dump_class_layout.py Use python3 in Tools/Scripts/dump-class-layout 2020-12-16 20:51:22 +00:00
lldb_webkit.py REGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap 2021-03-16 03:54:53 +00:00
lldb_webkit_unittest.py REGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap 2021-03-16 03:54:53 +00:00