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

Symbol undecorate check for pdb #2268

Closed
lynnux opened this issue Jan 7, 2020 · 4 comments
Closed

Symbol undecorate check for pdb #2268

lynnux opened this issue Jan 7, 2020 · 4 comments

Comments

@lynnux
Copy link
Contributor

@lynnux lynnux commented Jan 7, 2020

https://github.com/x64dbg/x64dbg/blob/development/src/dbg/pdbdiafile.cpp#L1029-L1032

    if(context.collectUndecoratedNames && !symbolInfo.name.empty() && symbolInfo.name.at(0) == '?')
    {
        undecorateName(symbolInfo.name, symbolInfo.undecoratedName);
    }

this check stop further undecorateName call if symbol name not start with '?'
I wrote a plugin which hook __unDNameEx to get more undecorated symbol in binary built by gcc or rust, their symbols are like __ZN3std9panicking11begin_panic17h0ae8f48c0cd25b16E. So could you consider remove the check or add more check start with '_' ?

@lynnux

This comment has been minimized.

Copy link
Contributor Author

@lynnux lynnux commented Jan 7, 2020

code from https://github.com/getsentry/symbolic/blob/master/demangle/src/lib.rs#L85-L91

fn is_maybe_cpp(ident: &str) -> bool {
    ident.starts_with("_Z") || ident.starts_with("__Z")
}

fn is_maybe_msvc(ident: &str) -> bool {
    ident.starts_with('?') || ident.starts_with("@?")
}

maybe we can use this idea to filter symbols?

@mrexodia

This comment has been minimized.

Copy link
Member

@mrexodia mrexodia commented Jan 7, 2020

I think something like: if(first == '?' || first == '_' || first == '@') should work for all cases right?

@mrexodia mrexodia closed this in f7f7a2f Jan 8, 2020
@lynnux

This comment has been minimized.

Copy link
Contributor Author

@lynnux lynnux commented Jan 8, 2020

thanks for the commit!

@mrexodia

This comment has been minimized.

Copy link
Member

@mrexodia mrexodia commented Jan 8, 2020

np :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.