summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>2004-12-03 00:07:09 +0000
committerJim Blandy <jimb@redhat.com>2004-12-03 00:07:09 +0000
commit3ffc8dd352c2fed9daf70275d390d422ad953c34 (patch)
treee0855dac69cde777f11cd1c98eaaefa1d0b67e9f
parent3b8624a9253fba5d6c867f07878b1ced479583b9 (diff)
downloadgdb-3ffc8dd352c2fed9daf70275d390d422ad953c34.tar.gz
* thread-db.c (thread_db_open): Produce debugging output.
-rw-r--r--rda/unix/ChangeLog2
-rw-r--r--rda/unix/thread-db.c19
2 files changed, 18 insertions, 3 deletions
diff --git a/rda/unix/ChangeLog b/rda/unix/ChangeLog
index 45fa9c83e90..19b874894c5 100644
--- a/rda/unix/ChangeLog
+++ b/rda/unix/ChangeLog
@@ -1,5 +1,7 @@
2004-12-02 Jim Blandy <jimb@redhat.com>
+ * thread-db.c (thread_db_open): Produce debugging output.
+
* thread-db.c (thread_db_thread_info): Produce output that more
closely resembles GDB's native thread output, to mollify the GDB
test suite.
diff --git a/rda/unix/thread-db.c b/rda/unix/thread-db.c
index 3a343dc85ec..5ea9aeabbea 100644
--- a/rda/unix/thread-db.c
+++ b/rda/unix/thread-db.c
@@ -1374,6 +1374,9 @@ thread_db_open (struct gdbserv *serv, int pid)
return -1; /* failure */
}
+ if (thread_db_noisy)
+ fprintf (stderr, "< -- succeeded, thread_agent = %p>\n", thread_agent);
+
/* All LinuxThreads versions support the signal-based debugging
interface. Newer versions of LinuxThreads also provide the
event-based debugging interface. NPTL has only ever supported
@@ -1381,10 +1384,20 @@ thread_db_open (struct gdbserv *serv, int pid)
interface to the event-based interface, to leave behavior on
older systems unchanged. */
if (get_thread_signals () == 0)
- return 0;
+ {
+ if (thread_db_noisy)
+ fprintf (stderr,
+ "(using thread signals cancel=%d, restart=%d, debug=%d)\n",
+ cancel_signal, restart_signal, debug_signal);
+ return 0;
+ }
- if (request_thread_db_events (serv) == -1)
- return 0;
+ if (request_thread_db_events (serv) == 0)
+ {
+ if (thread_db_noisy)
+ fprintf (stderr, "(using thread_db events)\n");
+ return 0;
+ }
return -1;
}