meaningful error message in gdbserver

SZOKOVACS Robert
2005-08-31T17:30:16Z

Hi,

I had a long day fighting with remote debugging, until I found out that my
libpthread and libthread_db versions didn't match. So I created the patch
below that makes gdbserver more verbose when failing, maybe it can save
some time for somebody in the future.

br

Szo

==========================================================================

diff -ruw gdb-6.3.50.20050831-orig/gdb/gdbserver/thread-db.c gdb-6.3.50.20050831/gdb/gdbserver/thread-db.c
--- gdb-6.3.50.20050831-orig/gdb/gdbserver/thread-db.c 2005-08-31 18:12:56.000000000 +0200
+++ gdb-6.3.50.20050831/gdb/gdbserver/thread-db.c 2005-08-31 18:27:18.000000000 +0200
@@ -351,6 +351,10 @@
/* No thread library was detected. */
return 0;

+ case TD_VERSION:
+ warning ("error initializing thread_db library:\nVersion of libpthread and libthread_db mismatch.");
+ return 0;
+
case TD_OK:
/* The thread library was detected. */