Filing this for reference sake. nat/gdb_thread_db.h has this: #define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir" $pdir currently doesn't work with gdbserver. gdbserver/thread-db.c has this: if (strncmp (this_dir, "$pdir", pdir_len) == 0 && (this_dir[pdir_len] == '\0' || this_dir[pdir_len] == '/')) { /* We don't maintain a list of loaded libraries so we don't know where libpthread lives. We *could* fetch the info, but we don't do that yet. Ignore it. */ }