This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BEAGLEBK: Qt Creator gdb debug error

Part Number: BEAGLEBK


Tool/software: Linux

Hi,

I used the following example to bitbake python3-native to fix the missing shutil for gdb debugger for processor sdk linux RT 4.01.00.06

The debugger starts which is great however...

1) Reporting unable to debug shared libraries

Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Could not load shared library symbols for 29 libraries, e.g. /usr/lib/libQt5Widgets.so.5.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?

2) Breakpoint set at start of main() in main.c are ignored. Breakpoint occurs on the instance of MainWindow

3) On breakpoint I get fault.
Signal name : SIGSEGV
Signal meaning : Segmentation fault

To try and fix the first issue I set Working Directory in the QtCreator Build&Run->Debuggers using either of these two paths. I don't know which is the right one.

<processor sdk>/linux-devkit/sysroots/arm7ahf-neon-linux-gnueabi

<processor sdk>/targetNFS

both paths report same on debugging ...

File "<processor SDK>/targetNFS/lib/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".

Segmentation fault still occurs, I am now stuck.

Is there anything missing on the target board,? Beaglebone Black.

Other info

Qt creator 4.5.1

Beaglebone Black

Look forward to hear from you

best regards

  • Hello Naseer,

    You need to add this to QtCreator -> Tools -> Options... -> Debugger -> GDB -> Additional Startup Commands.
    add-auto-load-safe-path <Processor SDK>/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/lib/libstdc++.so.6.0.22-gdb.py

    Best regards,
    Kemal

  • Hi Kemal,
    I have moved onto latest sdk build linux RT 4.02.00.09
    That Additional startup command worked thanks!
    It would be helpful to understand why this has happened.

    Can you help with the next problem. The segmentation fault still occurs in main.cpp on MainWindow w instance. Also, Breakpoints before the instance do not trigger as before. In case it is my code, the fault occurs on a simple helloworld application.
    Child terminated with signal = 0xb (SIGSEGV)
    Debugging has finished
    Application finished with exit code 0

    best regards,

    Naseer
  • I have good news for you, erwel, Erich, Ilya, Алексан&,  Ghasem, jigarp, Aither and many other Qt developers who has struggling to fix this issue since 3 years but has not succeed yet. The issue was addressed and recently nailed down by Raffaele in this post.