SDK debugger crashed when sdk installed gdb mismatch libs

.
REPRODUCIBILITY: 100% when a new gdb version is out
OS VERSION: 4.5.0.18 / SDK 3.11 on linux
HARDWARE: n/a
UI LANGUAGE: n/a
REGRESSION: no

DESCRIPTION:

With the sdk a copy of gdb is installed in ~/SailfishOS/bin/. In default config the QT Creator uses this copy of gdb. And gdb use all the libs installed in /lib64 or /usr/lib64. So if the gdb version mismatch with the lib* versions the debug stops with an error.

PRECONDITIONS:

Install newest SDK 3.11 on a linux pc.

STEPS TO REPRODUCE:

  1. Install newest SDK 3.11 on a linux pc.
  2. Update the os on the linux pc (run a ‘dup’)
  3. Start debugging in QT Creator

EXPECTED RESULT:

Find quickly all errors :slight_smile:

ACTUAL RESULT:

GDB crashed.

MODIFICATIONS:

n/a

ADDITIONAL INFORMATION:

/var/log/messages shows:
Unexpected GDB stderr: “/home/nn/SailfishOS/bin/gdb: /lib64/libncursesw.so.6: version NCURSESW6_5.6.20061217' not found (required by /home/nn/SailfishOS/bin/gdb)\n/home/nn/SailfishOS/bin/gdb: /lib64/libncursesw.so.6: version NCURSESW6_5.3.20021019’ not found (required by /home/nn/SailfishOS/bin/gdb)\n/home/nn/SailfishOS/bin/gdb: /lib64/libncursesw.so.6: version `NCURSESW6_5.1.20000708’ not found (required by /home/nn/SailfishOS/bin/gdb)\n”
2024-10-14T13:18:18.565346+02:00 localhost env[5658]: *** UNEXPECTED STATE TRANSITION: Debugger::Internal::GdbEngine(0x55fc48255ef0, name = “GdbEngine”) “State changed from EngineSetupRequested(1) to InferiorShutdownRequested(12)”

Workaround:
Copy or link /bin/gdb to ~/SailfishOS/bin/