-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Native debugging with symbols is broken on Linux/arm64 #34108
Comments
@echesakovMSFT, does it work in Release, and only breaks in Checked and Debug, or only in Checked? If that is the case, then it sounds like a configuration-specific overwriting issue, which can be fixed. |
I can confirm the same issue happens on x64 with debug build. And the .dbg files definitely come from the same build as the executables. lldb just silently fails to load the symbols, dbg displays a warning that the CRC doesn't match. |
Interesting, if I comment out run the 2nd and 3rd strip commans COMMAND ${CMAKE_OBJCOPY} --strip-debug ${strip_source_file}
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=${strip_destination_file} ${strip_source_file} and then run the strip commands manually in the target artifacts folder after the build, the crc32 matches and debugger can load it. |
@janvorli, interesting. I think if CRC check is satisfied in
or perhaps investigate the root casue and see if we can fix that instead? |
Even more interesting, the .dbg file ended up being 10x larger when I ran the commands manually. And looking at the build log it seems we might be executing the whole custom command twice. I can see doubled lines like
|
Yes, it is the case. I've added a message into the stripsymbols function and I can see that it is invoked twice for each target. |
And here we have the culprit: runtime/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt Lines 216 to 217 in 5a1d115
It used to be
So the 2nd stripping was prevented before. |
I am going to fix that |
It appears that #33716 causes the following issues on Linux/arm64 (it could be on other architectures as well)
This is what shows up when I run gdb
and this is output of bt command in lldb
As you can see there is no information about the source files.
If I manually disable stripping the symbols by commenting out the following lines
runtime/eng/native/functions.cmake
Lines 282 to 290 in db23750
everything goes back to normal
cc @janvorli @am11
The text was updated successfully, but these errors were encountered: