Skip to content

dynamic get QueryFullProcessImageNameA for XP support #263

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

Merged
merged 2 commits into from
Oct 31, 2019

Conversation

lynnux
Copy link

@lynnux lynnux commented Oct 29, 2019

this is for gnu build on xp.

btw, the msvc build not use libbacktrace, it use dbghelp, but the dbhelp.dll on XP lack those functions:

SymInitializeW
SymFromAddrW
SymGetLineFromAddrW64
SymFromInlineContextW
SymGetLineFromInlineContextW

which seems a lot work to do, the easy solution for msvc build is to combined a newer version of dbghelp.dll with exe on xp.

@alexcrichton
Copy link
Member

Thanks!

I think though the behavior that we'll want here is that if QueryFullProcessImageName isn't available we fail to load a filename entirely on Windows. The semantics of QueryFullProcessImageName are what we want in that it returns the current path of the executable rather than GetModuleFileName which I believe returns the original path to the executable (before any renames happened, if any)

@lynnux
Copy link
Author

lynnux commented Oct 31, 2019

Ok, GetModuleFileName removed

@alexcrichton alexcrichton merged commit d4bc045 into rust-lang:master Oct 31, 2019
@alexcrichton
Copy link
Member

Thanks!

@lynnux lynnux mentioned this pull request Nov 1, 2019
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.

2 participants