diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-11-05 02:26:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-11-05 02:26:16 +0000 |
commit | 9532eb67a4a92baab960d8d37bfa28048285dabb (patch) | |
tree | 179887a0e1239d9aebb41cffb1134f019712b56b /linuxthreads_db/td_ta_new.c | |
parent | ab86fbb1d2866df567219904982dac61751808e5 (diff) | |
download | glibc-9532eb67a4a92baab960d8d37bfa28048285dabb.tar.gz |
Update.
1999-11-03 Ulrich Drepper <drepper@cygnus.com>
* Versions.def: Add version for libthread_db.
Diffstat (limited to 'linuxthreads_db/td_ta_new.c')
-rw-r--r-- | linuxthreads_db/td_ta_new.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linuxthreads_db/td_ta_new.c b/linuxthreads_db/td_ta_new.c index 65535f8d14..8d6ee9a7c5 100644 --- a/linuxthreads_db/td_ta_new.c +++ b/linuxthreads_db/td_ta_new.c @@ -25,10 +25,16 @@ #include "thread_dbP.h" +/* Datatype for the list of known thread agents. Normally there will + be exactly one so we don't spend much though on making it fast. */ +struct agent_list *__td_agent_list; + + td_err_e td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta) { psaddr_t addr; + struct agent_list *elemp; LOG (__FUNCTION__); @@ -130,5 +136,19 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta) goto free_return; } + /* Now add the new agent descriptor to the list. */ + elemp = (struct agent_list *) malloc (sizeof (struct agent_list)); + if (elemp == NULL) + { + /* Argh, now that everything else worked... */ + free (*ta); + return TD_MALLOC; + } + + /* We don't care for thread-safety here. */ + elemp->ta = *ta; + elemp->next = __td_agent_list; + __td_agent_list = elemp; + return TD_OK; } |