MINGW-packages: [gdb] Lastest version (8.3-1) is still showing as 8.2.1-1 and crash on startup

I was having problem starting gdb in all msys2 shells, so I deleted msys2 from my system and did a fresh install.

After that, I was having the following problems.

MSYS2 shell

$ gdb
osabi.c:661: internal-error: _initialize_gdb_osabi: gdb_osabi_names[] is inconsistent
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) Segmentation fault (core dumped)

MINGW32 shell :

$ gdb
C:/msys64/mingw32/bin/gdb.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

MINGW64 shell :

$ gdb
C:/msys64/mingw64/bin/gdb.exe: error while loading shared libraries: libsource-highlight-4.dll: cannot open shared object file: No such file or directory

Calling pacman -Q --info gdb reports the following in a MINGW64 shell :

Name                     : gdb
Version                  : 8.2.1-1
Description              : GNU Debugger (MSYS2 version)
Architecture             : x86_64

This URL reports that the latest version should be 8.3-1.

If I open gdb.exe with an hexadecimal editor, I can see a lot of reference to “gdb-8.3” (mostly in assertion strings).

To be sure, one of my colleague, which didn’t update for a few days and is still able to debug, did this :

$ sha256sum `which gdb`
099588743af8a4847c2d4c51b85bb67a139194db74eec654aa94e9720b4e1a84 */mingw64/bin/gdb

On my computer, it yield this result :

$ sha256sum `which gdb`
91c8f9f131a3a2c5cea7ecb9f442bb2d97367bb7213d629ca5abdce1f2169d68 */mingw64/bin/gdb

This SHA matches the SHA of gdb 8.3-1.

I cannot reinstall 8.2.1-1, as the meta-data for the package are wrong, but gdb 8.3-1 doesn’t start.

What should I do?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@oscarfv : thank you for that. Unfortunately, while it fixes the interactive problem, it appears to mess up breakpoints. When I use winpty gdb ... , set a breakpoint, and the breakpoint is hit, gdb exits. When I use gdb ... and set the same breakpoint, gdb works normally.

Is there a replacement MSYS2 gdb? That would work, too.