GDB does not see any stream except

GDB does not see any thread except the one in which the failure occurred; or SIGTRAP kills my program when I set a breakpoint.

+3
source share
1 answer

This often happens on Linux, especially for embedded purposes. There are two common causes:

  • you use glibc and you shared libpthread.so.0
  • mismatch between libpthread.so.0andlibthread_db.so.1

GDB , " ", glibc glibc. libthread_db.so.1 ( glibc), . , libthread_db.so.1 libpthread.so.0 . , libthread_db.so.1 libpthread.so.0.

: strip --strip-debug libpthread.so.0 strip libpthread.so.0.

, , libpthread.so.0 libthread_db.so.1 .

+5

Source: https://habr.com/ru/post/1757430/


All Articles