Skip to content

Recover implicit this parameters in GNU3 symbols - #8393

Draft
plafosse wants to merge 1 commit into
devfrom
test_gnu3_implicit_this
Draft

Recover implicit this parameters in GNU3 symbols#8393
plafosse wants to merge 1 commit into
devfrom
test_gnu3_implicit_this

Conversation

@plafosse

@plafosse plafosse commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • make GNU3 demangling instance-biased for ambiguous scoped functions
  • recover an implicit this parameter pointing to the structured enclosing type
  • omit this for symbols known to be non-members
  • preserve instance recovery for class methods nested inside anonymous namespaces
  • update direct and generated GNU3 demangler expectations

Rationale

GNU3 symbols generally do not encode whether an ambiguous scoped function is static. The previous implementation only emitted this when it could prove one existed, which omitted it from ordinary member functions. This changes the fallback to assume an instance method unless the symbol provides evidence that it cannot be one. Ambiguous static members and namespace-scoped functions intentionally follow that fallback.

Validation

  • compiled as part of a full RelWithDebInfo Binary Ninja standalone application build with UI and plugins
  • built the GNU3 direct and generated unit-test targets

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.

1 participant