Explicit libthread_db selection

libthread_db.so is a library used to extract thread information from debuggees by parsing the memory of libpthread.so which is linked into multithreaded debuggees. This is needed when, for example, reading from thread-local storage such as the errno variable.

When replaying recordings, UDB will use the libthread_db.so found on the replaying system. If the version of libpthread.so used in the recording is newer than or otherwise incompatible with this, it becomes necessary to provide a libthread_db.so which ‘matches’ the libpthread.so in the recording.

An alternative libthread_db.so can be provided by the UDB command-line parameter --thread-db or alternatively, via the environment variable UNDO_thread_db.


# Using the command-line parameter:

$ udb --thread-db $SDK/lib/libthread_db.so my_recording.undo

# Alternatively, using the environment variable:

$ UNDO_thread_db=$SDK/lib/libthread_db.so udb my_recording.undo