[webkit-changes] [WebKit/WebKit] f2a88a: dump-class-layout prints class types with confusin...

Kimmo Kinnunen noreply at github.com
Tue Jan 16 11:30:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f2a88a6e951224df80a05d1f48f58bfb80acd503
      https://github.com/WebKit/WebKit/commit/f2a88a6e951224df80a05d1f48f58bfb80acd503
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
    M Tools/lldb/dump_class_layout_unittest.py
    M Tools/lldb/lldb_dump_class_layout.py

  Log Message:
  -----------
  dump-class-layout prints class types with confusing indent
https://bugs.webkit.org/show_bug.cgi?id=267538
rdar://121002860

Reviewed by Simon Fraser.

Before, the offsets were:
 - type + name at 0
 - class type members at +4
 - vptr type at +3
 - other members at +2

Fix inconsistent prefix in the format strings:
 - type + name had %s%s
 - members had %s  %s

Fix vptr by separating the type and the name in the data model.

Changes the logic as:
- type + name at +0
- all members at +4

Makes it possible to understand to which class type member the
padding belongs to.

* Tools/lldb/dump_class_layout_unittest.py:
(TestDumpClassLayout):
* Tools/lldb/lldb_dump_class_layout.py:
(ClassLayoutBase._to_string_recursive):
(ClassLayout._parse):

Canonical link: https://commits.webkit.org/273083@main




More information about the webkit-changes mailing list