This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
meaningful error message in gdbserver
- From: SZOKOVACS Robert <szo at ies dot hu>
- To: <gdb-patches at sources dot redhat dot com>
- Date: Wed, 31 Aug 2005 19:30:05 +0200 (CEST)
- Subject: meaningful error message in gdbserver
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. */