summaryrefslogtreecommitdiff
path: root/linuxthreads_db/td_ta_event_addr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-02 23:44:42 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-02 23:44:42 +0000
commita9cb398f7b2a6a8549ec33cdcc99f510566d3819 (patch)
tree03683c10060e9a77ed564004e04fa4e8c043db5d /linuxthreads_db/td_ta_event_addr.c
parent03fc7ab6ed4bc2f71964a3d31ad578821256b6bc (diff)
Update.
1999-11-02 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/sys/procfs.h: Include sys/ucontext.h instead of duplicating definitions.
Diffstat (limited to 'linuxthreads_db/td_ta_event_addr.c')
-rw-r--r--linuxthreads_db/td_ta_event_addr.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/linuxthreads_db/td_ta_event_addr.c b/linuxthreads_db/td_ta_event_addr.c
index 6d6d4a850b..4edd54c55d 100644
--- a/linuxthreads_db/td_ta_event_addr.c
+++ b/linuxthreads_db/td_ta_event_addr.c
@@ -18,13 +18,54 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <gnu/lib-names.h>
+
#include "thread_dbP.h"
td_err_e
td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr)
{
- /* XXX We have to figure out what has to be done. */
+ td_err_e res = TD_NOEVENT;
+ const char *symbol = NULL;
+
LOG (__FUNCTION__);
- return TD_NOCAPAB;
+
+ switch (event)
+ {
+ case TD_CREATE:
+ symbol = "__linuxthreads_create_event";
+ break;
+
+ case TD_DEATH:
+ symbol = "__linuxthreads_death_event";
+ break;
+
+ case TD_REAP:
+ symbol = "__linuxthreads_reap_event";
+ break;
+
+ default:
+ /* Event cannot be handled. */
+ break;
+ }
+
+ /* Now get the address. */
+ if (symbol != NULL)
+ {
+ psaddr_t taddr;
+
+ if (ps_pglobal_lookup (ta->ph, LIBPTHREAD_SO, symbol, &taddr) == PS_OK)
+ {
+ /* Success, we got the address. */
+ addr->type = NOTIFY_BPT;
+ addr->u.bptaddr = taddr;
+
+ res = TD_OK;
+ }
+ else
+ res = TD_ERR;
+ }
+
+ return res;
}