2

I never experienced this behaviour on classic desktop platform thus I'm asking here. The question is how to correctly debug C++ application (g++ build) using GDB on Raspberry Pi? When my application crashes and hangs, the debugger does not provide any useful backtrace. There are only 2 lines (sometimes more but it never reaches my code):

(gdb) bt
#0  0x7656d25c in g_hash_table_lookup () at /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0
#1  0x76c16864 in  () at /usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0

It is impossible to find out how it get there from my code and where the really problem is. Why doesn't it provide the full backtrace up to main() ? Does it need some more flags or some special settings?

The application is compiled with -ggdb3 and no optimize flags are added.

  • Raspbian Buster (kernel 4.19.75-v7+)
  • g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
  • GNU gdb (Raspbian 8.2.1-2) 8.2.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.