-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix Windows arm64 build #371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With these changes dethrace
now successfully compiles und runs under Windows on ARM (Win 11 v23H2).
Tested with MSVC (VS v17.10.3) & Clang v18.1.6.
Thank you @madebr for this fix!
|
Great to hear! @dethrace-labs |
@madebr agreed - when I had a quick look on this issue I thought CaptureStackBackTrace et all would be much simpler. @ArminiusTux for the icon I’m working on building a proper app package for MacOS and as part of that will include the windows icon config |
I looked into stacktrace generation past weekend, and I don't think I used these somewhat complicated functions to print stacktraces of crashed child processes on ci. |
src/harness/os/windows.c
Outdated
#elif defined(DETHRACE_CPU_ARM64) | ||
void *addr = (void*)ExceptionInfo->ContextRecord->Pc; | ||
#endif | ||
addr2line(windows_program_name, addr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rely on having an addr2line
executable on windows? We shouldn't use SymGetLineFromAddr64
or something instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. That's an error (addr2line
).
I'll fix it using functions from DbgHelp.
My latest changes will also print a stacktrace-like on wine where dbghelp is not 100% supported, and when
This is how it looks like on Windows with MSVC:
This is how it looks like with MingW on Windows with no addr2line:
I kept addr2line support, but it will only be used when the environment variable
edit:
|
I disabled the ci job, but when enabled it would look as follows:
https://github.com/madebr/dethrace/actions/runs/9550571423
Also, it's completely untested