Menu

#514 Leave minimal debug symbols in windows builds.

Windows
open
nobody
None
3 days ago
2026-03-23
No

Hello, I was trying to run the GTK windows build of VICE in Wine and receive a crash.
Unfortunately I receive only debug symbols from Wine dlls.
Maybe it would be an improvement to leave minimal debug information in the executables to get function names in backtraces?
Maybe using the strip command with the option --strip-debug would be already doing this.
I cannot say how much more space this would need.
If this is not wanted for release binaries, it may still be suitable for the github snapshot builds?

Discussion

  • gpz

    gpz - 2026-03-23

    I don't think this is easily possible (it will require changes in the configure script)

    Why run VICE in wine though? That sounds.... odd :)

     
    • Bernhard Übelacker

      Wanted to try the network play, but the current Debian package misses the menu entry.
      The SDL build starts up fine :-)
      Only the GTK windows build crashes instantly, but that is an issue that needs to be handled at Wine side.

      Thread 4 "pool-1" received signal SIGSEGV, Segmentation fault.
      [Switching to LWP 491]
      0x00006ffff843d011 in ?? ()
      (gdb) add-symbol-file /opt/wine-devel/lib/wine/x86_64-windows/d2d1.dll 0x6ffff8421000
      Reading symbols from /opt/wine-devel/lib/wine/x86_64-windows/d2d1.dll...
      (gdb) add-symbol-file /home/bernhard/wineprefix/drive_c/GTK3VICE-3.10-win64/bin/x64sc.exe 0x140001000
      (No debugging symbols found in /home/bernhard/wineprefix/drive_c/GTK3VICE-3.10-win64/bin/x64sc.exe)
      (gdb) bt
      #0  ID2D1Image_AddRef (This=0x0) at include/d2d1.h:3255
      #1  d2d_effect_SetInput (iface=0x7fc798644bd0, index=0, input=0x0, invalidate=<optimized out>) at dlls/d2d1/effect.c:2810
      #2  0x000000014022e58a in ?? ()
      

      I guess it may be this location: vice/src/arch/gtk3/directx_renderer_impl.cc:582.
      But getting it shown by the debugger would be better :-)

       
  • gpz

    gpz - 2026-03-23

    i get a totally different crash :)

    $ LANG="c" winedbg x64sc.exe
    MESA-INTEL: warning: Haswell Vulkan support is incomplete
    MESA-INTEL: warning: Haswell Vulkan support is incomplete
    002c:fixme:ver:GetCurrentPackageId (00007FFFFE2FFEF0 0000000000000000): stub
    00fc:fixme:wineusb:add_usb_device Interface 1 has 6 alternate settings; using the first one.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    WineDbg starting on pid 013c
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    WineDbg starting on pid 014c
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    00b8:fixme:wineusb:query_id Unhandled ID query type 0x5.
    0148:fixme:dbghelp:elf_search_auxv can't find symbol in module
    0034:fixme:ver:GetCurrentPackageId (00007FFFFE2FFEF0 0000000000000000): stub
    0150:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
    0150:fixme:reg:NtNotifyChangeMultipleKeys Unimplemented optional parameter
    0150:fixme:reg:NtNotifyChangeMultipleKeys Unimplemented optional parameter
    0150:fixme:reg:NtNotifyChangeMultipleKeys Unimplemented optional parameter
    0150:fixme:reg:NtNotifyChangeMultipleKeys Unimplemented optional parameter
    0150:fixme:reg:NtNotifyChangeMultipleKeys Unimplemented optional parameter
    0148:fixme:dbghelp:elf_search_auxv can't find symbol in module
    0x006ffffff4fa51 ntdll+0xfa51: retq
    Wine-dbg>bt
    Backtrace:
    =>0 0x006ffffff4fa51 in ntdll (+0xfa51) (0x007ffffe314e00)
      1 0x006ffffff94f15 in ntdll (+0x54f15) (0x007ffffe314e00)
      2 0x006ffffff544f4 in ntdll (+0x144f4) (0000000000000000)
    Wine-dbg>
    

    In any case, on debian you could just build yourself... or use our snapshot packages, i wouldnt bother with wine for this

     
    • Bernhard Übelacker

      I get also a backtrace with winedbg with wine-11.4:

      Backtrace:
      =>0 0x006ffff8a0d011 ID2D1Image_AddRef(This=<internal error>) [/usr/src/packages/BUILD/include/d2d1.h:3254] in d2d1 (0x007fffffa81318)
        1 0x006ffff8a0d011 d2d_effect_SetInput+0x21(iface=<register RSI not accessible in this frame>, index=<register RBX not accessible in this frame>, input=<register RDI not accessible in this frame>, invalidate=<internal error>) [/usr/src/packages/BUILD/dlls/d2d1/effect.c:2805] in d2d1 (0x007fffffa81318)
        2 0x0000014022e58a in x64sc (+0x22e58a) (0x007fffffa81318)
        3 0x006ffffc26b3c2 in libglib-2.0-0 (+0x7b3c2) (0000000000000000)
        4 0x006ffffc26a4ff in libglib-2.0-0 (+0x7a4ff) (0000000000000000)
        5 0x006ffffc269d17 in libglib-2.0-0 (+0x79d17) (0000000000000000)
        6 0x006ffffeec283e _beginthreadex_trampoline+0x3e(arg=<register RBX not accessible in this frame>) [/usr/src/packages/BUILD/dlls/msvcrt/thread.c:201] in msvcrt (0000000000000000)
        7 0x006fffffa11509 in kernel32 (+0x11509) (0000000000000000)
        8 0x006fffffbf0d3b in ntdll (+0x10d3b) (0000000000000000)
      0x006ffff8a0d011 d2d_effect_SetInput+0x21 [/usr/src/packages/BUILD/dlls/d2d1/effect.c:2805] in d2d1: movq (%rdi), %rax
      

      Thanks for the pointer to the upstream deb packages.

      However, I was just generally asking if it would be an improvement to be able to get a symblized backtrace of crashes, don't know how big the size penalty would be and how often crashes for regular users happen.

      A short test to measure the size penalty for the windows build could be to feed following change into the github action:

      vice/src/arch/headless/make-bindist_win32.sh:180
      
      -            $STRIP $BINDISTDIR/$(basename $b).exe
      +            $STRIP --strip-debug $BINDISTDIR/$(basename $b).exe
      
       
  • gpz

    gpz - 2026-03-23

    We have not considered it so far, because honestly... debugging using gdb on windows is plain impossible (it is so slow its not funny anymore, it takes literally hours for it to even start up). And WINE isn't really a target we are looking at at all :)

    I'd rather not mess with the bindist scripts, as that stuff is for the binary windows releases (the snapshot builds are just an artefact), and we are happy it works at all (and we don't have a windows maintainer right now).

     
    • Bernhard Übelacker

      I made a small test with a simple test binary - and unfortunately the --strip-debug did not work as I expected - the backtrace did no longer show function names.

      In that regard I was after something similar to clang's -gline-tables-only, but it looks like this does not exist for gcc.

      Thanks for looking into it.

       
    • Bernhard Übelacker

      debugging using gdb on windows is plain impossible (it is so slow its not funny anymore, it takes literally hours for it to even start up)

      Having all libraries with debug information may give gdb a big slowdown. Therefore it could help to have only that executable/shared library/dll with debug information in place that is really needed for this debug task. Unfortunately there do not exists debug symbol packages for msys2 as far as I know.

      I'd rather not mess with the bindist scripts, as that stuff is for the binary windows releases ...

      I could not resist and did another test with avoiding to strip binaries,
      to have some numbers:
      https://github.com/bernhardu/vice-svn-mirror/releases/tag/test3
      https://github.com/bernhardu/vice-svn-mirror/commits/143747b7f21e1fd99d39e9905d52c2446911917a/

      Above GTK3VICE-3.10-win64-rtest3.zip takes around 100 MB,
      so having complete debug symbols doubles the size of the zip file.

      And if it is of any interest:

       
  • gpz

    gpz - 3 days ago

    nice to see that you found the problem and fixed it!

     

Log in to post a comment.

MongoDB Logo MongoDB