ghidra/Ghidra/Features/SwiftDemangler
2024-11-04 11:27:05 -05:00
..
ghidra_scripts GP-4898 - All Demanglers: added MangledContext; Microsoft MDMang: added 2024-09-19 12:26:30 +00:00
src GP-4898 - more Demangler changes: interface, individual demanglers, tests 2024-09-26 13:58:46 -04:00
build.gradle GP-3535: Improved Swift support 2024-02-26 11:31:24 -05:00
certification.manifest GP-5078: Improvements to Ghidra Module directory layout 2024-10-31 10:34:26 -04:00
Module.manifest GP-3535: Improved Swift support 2024-02-26 11:31:24 -05:00
README.md GP-5078: Adding a little to modules' README 2024-11-04 11:27:05 -05:00

SwiftDemangler

This module provides support for demanling mangled Swift symbols. Supported mangled symbols begin with $S, $s, _$S", _$s, or _T.

The demangler currently relies on making direct calls to the native Swift demangler tool, which comes bundled with Swift. For example:

% swift demangle --compact --expand _\$s7SwiftUI4ViewMp
Demangling for _$s7SwiftUI4ViewMp
kind=Global
  kind=ProtocolDescriptor
    kind=Type
      kind=Protocol
        kind=Module, text="SwiftUI"
        kind=Identifier, text="View"
protocol descriptor for SwiftUI.View

The resulting tree is parsed by the Ghidra Swift Demangler to form and apply a demangled symbol name.

By default, the Demangler Swift Analyzer will search for the native Swift Demangler on the PATH. If it resides elsewhere, its path can be specified in the analyzer's options.