Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Objective-C classes Swift demangling ##bin #23115

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

mrmacete
Copy link
Collaborator

@mrmacete mrmacete commented Jul 10, 2024

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

Use r_bin_demangle_swift to demangle Swift Objective-C classes in the couple of places where that was missing, and ensure all parsed classes have index set, to allow coexistence of different categories with the same name.

@trufae
Copy link
Collaborator

trufae commented Jul 10, 2024

test output should be updated. a bit more verbose, but if that fixes other usecases better sync up

Screenshot 2024-07-10 at 21 50 36

@mrmacete mrmacete marked this pull request as draft July 10, 2024 21:06
@mrmacete
Copy link
Collaborator Author

yeah not sure of all this sudden Swift. prefixing

@mrmacete
Copy link
Collaborator Author

apart from that yeah it fixes a lot of stuff, but we need better test coverage

@trufae trufae changed the title Fix Objective-C classes Swift demangling ##bin WIP: Fix Objective-C classes Swift demangling ##bin Jul 12, 2024
@trufae
Copy link
Collaborator

trufae commented Jul 17, 2024

please rebase

@mrmacete mrmacete force-pushed the fix/objc-classes-swift-demangling branch from 5e6f2dd to 879b705 Compare July 18, 2024 07:07
@mrmacete
Copy link
Collaborator Author

rebased, but also observed that the Swift. prefix is an artifact of r2's own demangler, because it goes away on macos by enabling -e bin.demangle.trylib=true

@mrmacete
Copy link
Collaborator Author

i can work around it in mach0_classes or we can fix the root cause, what do you think?

@trufae
Copy link
Collaborator

trufae commented Jul 19, 2024

ok to merge?

@mrmacete mrmacete force-pushed the fix/objc-classes-swift-demangling branch from ce5da31 to 670da7e Compare July 19, 2024 18:04
@mrmacete mrmacete marked this pull request as ready for review July 19, 2024 18:05
@mrmacete
Copy link
Collaborator Author

yeah should be "good enough" now

@mrmacete mrmacete changed the title WIP: Fix Objective-C classes Swift demangling ##bin Fix Objective-C classes Swift demangling ##bin Jul 19, 2024
mrmacete added 2 commits July 19, 2024 20:33
And ensure all parsed classes have `index` set, to allow coexistence
of categories with the same name.
@trufae trufae force-pushed the fix/objc-classes-swift-demangling branch from 670da7e to ae9350b Compare July 19, 2024 18:33
@trufae trufae merged commit 8cf53fe into master Jul 19, 2024
25 of 26 checks passed
@trufae
Copy link
Collaborator

trufae commented Jul 19, 2024

merged!

@trufae trufae deleted the fix/objc-classes-swift-demangling branch August 8, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants