Explicit libthread_db selection

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

When replaying recordings, UDB uses 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.

For example, 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