diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-08 06:38:19 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-08 06:38:19 +0000 |
commit | 9b1b33cea3ac0ae4eec04e86b1b489aeb5d2f552 (patch) | |
tree | a349b89e70f8e5cfa79ca7557db72819750adc81 /linuxthreads_db/td_thr_event_enable.c | |
parent | f70b0ea2c7f8a5b3d6450c4e88f8db91ad06048b (diff) | |
download | glibc-9b1b33cea3ac0ae4eec04e86b1b489aeb5d2f552.tar.gz glibc-9b1b33cea3ac0ae4eec04e86b1b489aeb5d2f552.tar.xz glibc-9b1b33cea3ac0ae4eec04e86b1b489aeb5d2f552.zip |
Update.
* elf/dl-load.c (_dl_map_object_from_fd): Add missing \n in error message.
Diffstat (limited to 'linuxthreads_db/td_thr_event_enable.c')
-rw-r--r-- | linuxthreads_db/td_thr_event_enable.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/linuxthreads_db/td_thr_event_enable.c b/linuxthreads_db/td_thr_event_enable.c index b6ec4d0c2f..407f3fc44a 100644 --- a/linuxthreads_db/td_thr_event_enable.c +++ b/linuxthreads_db/td_thr_event_enable.c @@ -31,13 +31,27 @@ td_thr_event_enable (th, onoff) LOG ("td_thr_event_enable"); /* Write the new value into the thread data structure. */ - if (th->th_unique != NULL) - if (ps_pdwrite (th->th_ta_p->ph, - ((char *) th->th_unique - + offsetof (struct _pthread_descr_struct, - p_report_events)), - &onoff, sizeof (int)) != PS_OK) - return TD_ERR; /* XXX Other error value? */ + if (th->th_unique == NULL) + { + psaddr_t addr; + + if (td_lookup (th->th_ta_p->ph, LINUXTHREADS_INITIAL_REPORT_EVENTS, + &addr) != PS_OK) + /* Cannot read the symbol. This should not happen. */ + return TD_ERR; + + if (ps_pdwrite (th->th_ta_p->ph, addr, &onoff, sizeof (int)) != PS_OK) + return TD_ERR; + + return TD_OK; + } + + if (ps_pdwrite (th->th_ta_p->ph, + ((char *) th->th_unique + + offsetof (struct _pthread_descr_struct, + p_report_events)), + &onoff, sizeof (int)) != PS_OK) + return TD_ERR; /* XXX Other error value? */ return TD_OK; } |