aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/thread-db.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/thread-db.c')
-rw-r--r--gdb/gdbserver/thread-db.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index 06dfe35..8af0539 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -759,6 +759,19 @@ thread_db_free (struct process_info *proc)
{
#ifndef USE_LIBTHREAD_DB_DIRECTLY
td_err_e (*td_ta_delete_p) (td_thragent_t *);
+ td_err_e (*td_ta_clear_event_p) (const td_thragent_t *ta,
+ td_thr_events_t *event);
+
+ td_ta_clear_event_p = dlsym (thread_db->handle, "td_ta_clear_event");
+ if (td_ta_clear_event_p != NULL)
+ {
+ td_thr_events_t events;
+
+ /* Set the process wide mask saying we aren't interested in any
+ events anymore. */
+ td_event_fillset (&events);
+ (*td_ta_clear_event_p) (thread_db->thread_agent, &events);
+ }
td_ta_delete_p = dlsym (thread_db->handle, "td_ta_delete");
if (td_ta_delete_p != NULL)
@@ -766,6 +779,10 @@ thread_db_free (struct process_info *proc)
dlclose (thread_db->handle);
#else
+ td_thd_events_t events;
+
+ td_event_fillset (&events);
+ td_ta_clear_event (thread_db->thread_agent, &events);
td_ta_delete (thread_db->thread_agent);
#endif /* USE_LIBTHREAD_DB_DIRECTLY */