Skip to content

Preserve template namespaces before operator-> and operator->* - #10054

Merged
ryanmkurtz merged 1 commit into
NationalSecurityAgency:masterfrom
b84330808:symbolpath-arrow-operator
Oct 30, 2026
Merged

ryanmkurtz merged 1 commit into
NationalSecurityAgency:masterfrom
b84330808:symbolpath-arrow-operator

Conversation

@b84330808

Copy link
Copy Markdown
Contributor

The PDB applicator builds function namespaces with new SymbolPath(name) (FunctionSymbolApplier.getReconciledSymbolPath), and MDMangUtils.consolidateSymbolPath also runs PDB names through SymbolPathParser. For MSVC names like

std::unique_ptr<A::B,std::default_delete<A::B> >::operator->

the > in operator-> leaves the template counter unbalanced, so the parser falls back to splitting on every :: and returns

[std, unique_ptr<A, B,std, default_delete<A, B> >, operator->]

instead of [std, unique_ptr<A::B,std::default_delete<A::B> >, operator->]. operator-> on std::unique_ptr and the STL iterators is very common in C++ programs, so their functions land in made-up namespaces. operator->* hits the same path.

#9851 handled this for operator<, operator<<, operator<=> and the rest; this adds operator-> and operator->* to the same list.

I checked it with two extra cases in SymbolPathParserTest (both fail before, pass after; SymbolPathTest and GnuDemanglerParser2Test still pass). Following CONTRIBUTING, I left those tests out of this PR, but can add them if you want.

AI-generated by Claude Code.
I used Claude Code to write this change.

The '>' in operator-> and operator->* leaves the template counter
unbalanced, so SymbolPathParser fell back to splitting on every "::",
including the ones inside template arguments. Treat both like the other
terminal angle operators.

AI-generated by Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ryanmkurtz ryanmkurtz added the Status: Triage Information is being gathered label Oct 28, 2026
@ryanmkurtz ryanmkurtz added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Triage Information is being gathered labels Oct 29, 2026
@ryanmkurtz ryanmkurtz added this to the 12.3 milestone Oct 29, 2026
@ryanmkurtz
ryanmkurtz merged commit 57df817 into NationalSecurityAgency:master Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Internal This is being tracked internally by the Ghidra team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants