This is an archive of the discontinued LLVM Phabricator instance.

[lldb][TypeSystemClang] Format pointers to member functions as eFormatHex
ClosedPublic

Authored by Michael137 on Mar 3 2023, 6:29 AM.

Details

Summary

Before this patch, LLDB used to format pointers to members, such as,

void (Foo::*pointer_to_member_func)() = &Foo::member_func;

as eFormatBytes. E.g.,

(lldb) v pointer_to_member_func
(void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00

This patch makes sure we format pointers to member functions the same
way we do regular function pointers.

After this patch we format member pointers as:

(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94

Diff Detail

Event Timeline

Michael137 created this revision.Mar 3 2023, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 6:29 AM
Michael137 requested review of this revision.Mar 3 2023, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 6:29 AM
aprantl accepted this revision.Mar 3 2023, 8:41 AM
aprantl added inline comments.
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
5280

Are there any other suspicious break;s here?

This revision is now accepted and ready to land.Mar 3 2023, 8:41 AM

Looks like this is causing windows tests to fail: https://lab.llvm.org/buildbot#builders/219/builds/1013

Investigating...

Michael137 reopened this revision.Mar 7 2023, 7:55 AM
This revision is now accepted and ready to land.Mar 7 2023, 7:55 AM
Michael137 updated this revision to Diff 503044.Mar 7 2023, 7:56 AM
  • Rebase on top of latest test changes
Michael137 updated this revision to Diff 503056.Mar 7 2023, 8:15 AM
  • Update commit message