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

Single Quotes Surrounding issue on Mac #3

Open
CainSoulless opened this issue Jul 30, 2024 · 0 comments
Open

Single Quotes Surrounding issue on Mac #3

CainSoulless opened this issue Jul 30, 2024 · 0 comments

Comments

@CainSoulless
Copy link

CainSoulless commented Jul 30, 2024

Using single quotes in the mangled_name variable of the demangle_swift_name() function affected the correct naming of Swift functions when processed in Ghidra. This issue caused functions to appear with single quotes within the platform itself, which caused confusion when viewed in the Symbol Tree.

To resolve this issue, I removed the single quotes contained in the mangled_name variable.

After making this modification, the function has been working correctly.

def demangle_swift_name(mangled_name):
    os_name = System.getProperty("os.name").lower()

    # Determine the correct command based on the OS
    if "mac" in os_name:
        cmd = 'xcrun swift-demangle --simplified --compact'
        **mangled_name = "{}".format(mangled_name)  # Surround with single quotes**

    else:
        cmd = 'swift-demangle --simplified --compact'
@CainSoulless CainSoulless changed the title Single Quotes Surrounding issue Single Quotes Surrounding issue on Mac Jul 30, 2024
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

No branches or pull requests

1 participant