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

Demangler: bad Ghidra symbol name for some templated functions #121

Open
robojumper opened this issue Mar 2, 2025 · 3 comments
Open

Demangler: bad Ghidra symbol name for some templated functions #121

robojumper opened this issue Mar 2, 2025 · 3 comments

Comments

@robojumper
Copy link
Collaborator

The script from #112 came up with "not great" names for some functions

e.g. baseID_Turn<10sStateID_c>__Fv_RC10sStateID_c demangles to sStateID_c const& baseID_Turn<sStateID_c>()

Excpected symbol name: baseID_Turn<sStateID_c>
Current symbol name: const&baseID_Turn<sStateID_c>

@elijah-thomas774
Copy link
Collaborator

Also came across this with CalcAnimationFVS<Q44nw4r3g3d27@unnamed@g3d_resanmchr_cpp@46CAnmFmtTraits<Q34nw4r3g3d18ResAnmChrFVS32Data>>__Q34nw4r3g 3d27@unnamed@g3d_resanmchr_cpp@FPCQ34nw4r3g3d16ResAnmChrFVSDataf_f becoming floatnw4r::g3d::anonymous::CalcAnimationFVS<nw4r::g3d::anonymous::CAnmFmtTraits<nw4r::g3d::ResAnmChrFVS32Data>>

@robojumper
Copy link
Collaborator Author

That one demangles to
float nw4r::g3d::(anonymous namespace)::CalcAnimationFVS<nw4r::g3d::(anonymous namespace)::CAnmFmtTraits<nw4r::g3d::ResAnmChrFVS32Data> >(nw4r::g3d::ResAnmChrFVSData const*, float), so I guess there's also some weird return type stripping that's not working correctly. The auto namespace creation is also not working great due to the namespace separator appearing in template arguments...

@elijah-thomas774
Copy link
Collaborator

I didnt even think about the namespace creation aspect, I was just thinking about the return type here xD

Image

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

2 participants