-
Notifications
You must be signed in to change notification settings - Fork 95
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
ci: build wheels with debug info #1599
Conversation
Looks like I should get to #847 first |
2a3c884
to
2821347
Compare
Comparing with main:
So Windows gains about 80% but the other platforms are largely unchanged I think that's still about reasonable, though. Once I confirm that I can get stacktraces with this, I can then look at splitting debuginfo. |
|
It appears to be because the default backtrace mechanism can only find exported symbols https://stackoverflow.com/questions/6934659/how-to-make-backtrace-backtrace-symbols-print-the-function-names |
Hmm, and libunwind doesn't seem to help :/ libbacktrace supposedly can do this, but it's not integrated into backward-cpp |
Or enabling one of libbfd/libdwarf/etc. but then we run back into licensing issues |
Ok, so I'm not sure backward-cpp will be useful here. But we can at least build with debug info. |
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.
+1
FYI:
For Linux, we can get source locations from backtrace()
/backtrace_symbols()
output later with .so
and addr2line
.
For Windows, I have a backtrace implementation which is licensed by LGPL 2.1 but I can re-license it to Apache-2.0 because I'm the author.
Oh, interesting. I'll give it another shot tomorrow then. backward-cpp uses backtrace_symbols by default, but when I saw it couldn't give the symbol name if we hide the symbols via linker script I was a little disappointed. I haven't tested the behavior on Windows, I will try that too. |
|
Hmm, addr2line doesn't work
Presumably because this is a virtual address, but we don't have the base. I remember catchsegv/libSegFault would print that, maybe we can improve backward.cpp... |
I think so. |
Maybe backward.hpp could use adjustment then...I'll keep digging. Thanks! |
The other problem is that it seems to not do anything on Windows, which was the main motivation in the first place |
Hmm so from the backtrace_symbols manpage the default output is something like |
I suppose on Linux, we can print /proc/self/maps after the backtrace. There seems to be a macOS-equivalent API and Windows-equivalent API, too. But on Windows I still can't get it to actually print any backtrace in the first place... |
Ah, ok. Segfault will print the stack trace, something like abort() or assert(false) is handled by the windows runtime libraries. |
Ok! If I print On Windows, it already resolves line number properly, so long as the debug info is available...So I just need to package that up properly. However I can't get windows to find the pdb file unless I put it in PWD. For the time being I think that's still tenable. |
TODOs
|
FYI: If |
fd61eb5
to
a119769
Compare
Currently in the Go-based drivers, the CMakeLists.txt specifies LDFLAGS of |
Yeah, it's comparing specifically against "Release" so RelWithDebugInfo shouldn't count. |
f891515
to
b9ccea0
Compare
That's what I thought, just wanted to confirm. |
f736dd0
to
1ab68a4
Compare
Fixes #1583.