summaryrefslogtreecommitdiff
path: root/demangler
AgeCommit message (Collapse)Author
2026-05-22Refactor calling conventions to support correct representation of structuresRusty Wagner
2026-03-30Fix compiler warnings seen with Clang 21Mark Rowe
2026-03-27GNU3 Demangler: fix undefined evaluation order in expression buildersPeter LaFosse
Sequence reader-advancing calls into named locals before concatenating to avoid undefined evaluation order in operator+ chains (caused wrong output on MSVC/x86_64 GCC where operands evaluated right-to-left). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26GNU3 Demangler: fix float literal decoding to be platform-independentPeter LaFosse
Decode big-endian hex via union type-punning instead of casting bytes into native floats. Falls back to raw hex for NaN/Inf, long double, and __float128. Remove unused HexToDec helper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26GNU3 Demangler: fix substitution tracking, expressions, and type namesPeter LaFosse
Substitution table and scoping: - Fix generic lambda auto parameters: save/replace m_templateSubstitute with 'auto' placeholders for lambda-local T_/T0_/T1_ resolution - Fix local-name template scoping with m_inLocalName flag - Fix substitution table off-by-one for all-type template args - Fix pointer-to-member type (case 'M'): set substitute=true per ABI - Fix multi-character seq-id parsing (S10_, S11_, etc.) - Fix DemangleUnresolvedType decltype (DT/Dt) prefix consumption - Add forward template ref support for cv conversion operators - Fix sr qualifier-list PushType and conditional E handling - Fix multi-level sr scope resolution without N prefix - Fix sr + unscoped template substitution table tracking - Fix I...E argument pack handling (GCC I...E vs J...E) - Fix Dp pack expansion to show '...' for concrete types Expression formatting: - Fix L_Z embedded mangled name template scope isolation - Handle LZ<encoding>E function address template args - cl expression: callable(args) format with function substitute tracking - dt/pt expressions: obj.member and obj->member directly - fp_/fp<N>_ placeholders in decltype return types - Fix fL function-param scope validation - Fix DemangleBaseUnresolvedName 'on' prefix consumption Type names (Itanium ABI spec compliance): - x/y: "long long"/"unsigned long long" - a: "signed char" (distinct from 'c' = "char") - n/o: "__int128"/"unsigned __int128" - g: "__float128" via FloatType altName - Dd/Df/De: "decimal64"/"decimal32"/"decimal128" - Dh: "_Float16" - Dp: always show "..." for pack expansion - Fix 'n' literal: __int128 not __uint128 - Fix dot extension spacing Cleanup: - Remove unused NextIsOneOf, ReadUntil, DemangleInitializer - Guard GetRaw/GetTemplateType/PrintTables behind GNUDEMANGLE_DEBUG - Remove unreachable GetNameType C/D cases - Remove dead BinaryExpression "." check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26GNU3 Demangler: implement new construct supportPeter LaFosse
New special-name and type demangling: - GTt/GTn: GCC transaction clone symbols - TH/TW: TLS init and wrapper functions - Tc: covariant return thunks with dual call-offset parsing - Demangle _block_invoke symbols (Clang/Apple block invocations) - Intel Vector Function ABI (_ZGV) with ISA, mask, vlen, parameter kind parsing; z/Z guard variable disambiguation - Vendor-extended type (U <source-name>) for Objective-C block pointers - Lowercase vendor type (u <source-name>) for __remove_cvref etc. - GR <object name> reference temporary demangling - macOS $tlv$init thread-local variable initializer suffix - Fix typeinfo rendering to avoid duplicated name in output New operator and constructor support: - ABI tag (B <source-name>) consumption in DemangleUnqualifiedName, DemangleNestedName, and DemangleFunction - CI1/CI2 inheriting constructors with m_lastName save/restore - M data-member-prefix in DemangleNestedName for lambdas in data member initializers - operator<=> (spaceship) in GetOperator and DemangleUnqualifiedName Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26Rewrite GNU3 demangler for performance using DemangledTypeNodePeter LaFosse
Replace the TypeBuilder-based demangling path with a lightweight DemangledTypeNode representation that defers type object construction until the symbol is fully parsed. This avoids repeated heap allocation and ref-count churn during recursive descent. Key changes: - Add DemangledTypeNode / demangled_type_node.{h,cpp}: a compact IR that mirrors the type grammar without allocating BN Type objects - Use a thread_local demangler instance to amortize vector allocations across calls - Also commonize some of the demangled string length calculations. Result: ~3x throughput improvement on a 180K-symbol corpus with 97.7% success rate (matching the previous implementation). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-01-01update copyrights for 2026Jordan Wiens
2025-11-04Remove indenting APIs from Logger. These are thread unsafe by design.Rusty Wagner
Loggers are not owned by a specific thread and many are used by multiple threads. The indenting APIs could not be made to be thread safe in any way as they exist, so they have been removed. The data races caused by the indenting APIs are actually an important stability issue that could cause the indentation level to go out of bounds and crash the product. If you were using the indentation APIs, you will need to rewrite the usage to manually manage the indentation level in a thread safe way.
2025-08-01Add LogForException APIs to pass stack trace information separate from the ↵Rusty Wagner
message
2025-07-30[CMake] Specify CONFIGURE_DEPENDS for all file(GLOB ..)Mark Rowe
This ensures that CMake detects when files that match the glob are added or removed.
2025-06-25Update CXX_STANDARD to 20.Alexander Taylor
Also update minimum CMake version.
2025-06-25Remove implicit conversions from Confidence to underlying type, these can ↵Rusty Wagner
cause bugs and also issues with C++20
2025-06-05Fix crash in GNU3 demangler with specific non-mangled stringMason Reed
Fixes https://github.com/Vector35/binaryninja-api/issues/6902 however we still need to figure out what we want to do about the type info names being invalid. There really is not a good way to tell without saying all type info names _must_ be mangled.
2025-05-19Fix demangler for internal core type changesRusty Wagner
2025-03-28missed the older dates!Jordan Wiens
2024-12-18Fix crash when demangling certain namesGlenn Smith
Fixes #6261
2024-11-21Fix gnu3 demangler losing track of NTR idsGlenn Smith
2024-10-23Compile demangler plugins directly into the core for P E R FGlenn Smith
Turns out, this is a rather hot path on initial binary loading (>50% runtime), and trying to pipe it all through the FFI makes it really slow. Like 100% slower. Ouch. Now, the demangler plugins are written with a bunch of #ifdef macros to allow for building both as a plugin and directly into the core. There is no functionality change here apart from regaining the lost performance.
2024-10-21Fix compiler warnings.Alexander Taylor
2024-10-17Fix free edition for demangler plugins (woops)Glenn Smith
2024-10-17Demangler plugin APIGlenn Smith
Closes #467