msys2 / msys2-installer

The one-click installer for MSYS2
BSD 3-Clause "New" or "Revised" License
561 stars 87 forks source link

Debug information of msys-2.0.dll available? #62

Closed bernhardu closed 1 year ago

bernhardu commented 1 year ago

Is there possibly a build artifact available which contains the debug information for msys-2.0.dll or an unstripped version of it? I tried to have a look at a bug report against wine for the msys2-installer, and now I receive a crash inside msys-2.0.dll, and debug information would help to tell if that is an already known wine issue.

I also failed to find instructions to rebuild the msys-2.0.dll from the msys2-runtime repository, I hope I not just have overlooked it?

lazka commented 1 year ago

On a phone right now so cant check, but the build artifacts here might contain debug info: https://github.com/msys2/msys2-runtime/actions/runs/4652041499

lazka commented 1 year ago

Here is a debug build for msys2-runtime: msys2-runtime3.4.6-debug.zip

bernhardu commented 1 year ago

Thank you very much, I did click through the actions of msys2-runtime but failed to find a suitable built being distracted by the sync-with-cygwin runs. The artifacts shown if selecting just the "build" workflows below the actions of msys2-runtime seem where your first zip is from. Using the dll from your second zip works like a charm and enables gdb to show a backtrace with line information. Turned out it was really one of the known issues from wine bug tracker. Thanks for your immediate response, I guess it is ok if I close this issue?

bernhardu commented 1 year ago

Just a short note if someone needs other debug information for msys-2.0.dll or other dlls. In the end I find it quite easy to just rebuild it:

nano /etc/makepkg.conf
# change OPTIONS line to ... !strip ... debug
pacman --sync git patch binutils
git clone "https://github.com/msys2/MSYS2-packages"
cd MSYS2-packages/msys2-runtime
makepkg -sCLf

This worked quite nice on a fresh installation, and makes sure that the binary matches the dll. (for other dlls needed some additional gpg keys e.g. libassuan: gpg --recv-key 528897B826403ADA.)

lazka commented 1 year ago

you don't need to change makepkg.conf, you can also add "!strip debug" to options in the respective PKGBUILD, see https://wiki.archlinux.org/title/Debugging/Getting_traces#Compilation_options