aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-02 20:31:09 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-02 20:31:09 +0000
commit8775fd2d8dbaec2ffe735081cce31e259c3b0d44 (patch)
tree886334047414a8747ba890be36effbe4a323c4ba /gdb/linux-thread-db.c
parentfcb4437118d0bbc82cf56f76d00c44c0220c0005 (diff)
downloadgdb-8775fd2d8dbaec2ffe735081cce31e259c3b0d44.zip
gdb-8775fd2d8dbaec2ffe735081cce31e259c3b0d44.tar.gz
gdb-8775fd2d8dbaec2ffe735081cce31e259c3b0d44.tar.bz2
gdb/
* config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove check for gnu/libc-version.h. * linux-thread-db.c <HAVE_GNU_LIBC_VERSION_H>: Remove include of gnu/libc-version.h. (enable_thread_event_reporting) <HAVE_GNU_LIBC_VERSION_H>: Remove variables libc_version, libc_major and libc_minor. Replace sscanf by inferior_has_bug. Extend the comment.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index dff8fc2..5073d7e 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -46,10 +46,6 @@
#include <signal.h>
#include <ctype.h>
-#ifdef HAVE_GNU_LIBC_VERSION_H
-#include <gnu/libc-version.h>
-#endif
-
/* GNU/Linux libthread_db support.
libthread_db is a library, provided along with libpthread.so, which
@@ -612,10 +608,6 @@ enable_thread_event_reporting (void)
{
td_thr_events_t events;
td_err_e err;
-#ifdef HAVE_GNU_LIBC_VERSION_H
- const char *libc_version;
- int libc_major, libc_minor;
-#endif
struct thread_db_info *info;
info = get_thread_db_info (GET_PID (inferior_ptid));
@@ -632,14 +624,13 @@ enable_thread_event_reporting (void)
td_event_emptyset (&events);
td_event_addset (&events, TD_CREATE);
-#ifdef HAVE_GNU_LIBC_VERSION_H
- /* The event reporting facility is broken for TD_DEATH events in
- glibc 2.1.3, so don't enable it if we have glibc but a lower
- version. */
- libc_version = gnu_get_libc_version ();
- if (sscanf (libc_version, "%d.%d", &libc_major, &libc_minor) == 2
- && (libc_major > 2 || (libc_major == 2 && libc_minor > 1)))
-#endif
+ /* There is a bug fixed between linuxthreads 2.1.3 and 2.2 by
+ commit 2e4581e4fba917f1779cd0a010a45698586c190a
+ * manager.c (pthread_exited): Correctly report event as TD_REAP
+ instead of TD_DEATH. Fix comments.
+ where event reporting facility is broken for TD_DEATH events,
+ so don't enable it if we have glibc but a lower version. */
+ if (!inferior_has_bug ("__linuxthreads_version", 2, 2))
td_event_addset (&events, TD_DEATH);
err = info->td_ta_set_event_p (info->thread_agent, &events);