* td_ta_event_getmsg.c (td_ta_event_getmsg): Write the NEXT pointer
into the inferior's __pthread_last_event variable, not a word from an inferior address used in the parent. Pass the address of a null word to ps_pdwrite, not a null pointer.
This commit is contained in:
parent
57b4cb2522
commit
58a851f108
@ -1,3 +1,10 @@
|
|||||||
|
2002-12-06 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
* td_ta_event_getmsg.c (td_ta_event_getmsg): Write the NEXT pointer
|
||||||
|
into the inferior's __pthread_last_event variable, not a word from
|
||||||
|
an inferior address used in the parent. Pass the address of a
|
||||||
|
null word to ps_pdwrite, not a null pointer.
|
||||||
|
|
||||||
2002-12-04 Roland McGrath <roland@redhat.com>
|
2002-12-04 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* td_thr_get_info.c (td_thr_get_info): ti_tid is pthread_t, not a PID.
|
* td_thr_get_info.c (td_thr_get_info): ti_tid is pthread_t, not a PID.
|
||||||
|
@ -43,11 +43,11 @@ td_ta_event_getmsg (const td_thragent_t *ta, td_event_msg_t *msg)
|
|||||||
&addr, sizeof (struct pthread *)) != PS_OK)
|
&addr, sizeof (struct pthread *)) != PS_OK)
|
||||||
return TD_ERR; /* XXX Other error value? */
|
return TD_ERR; /* XXX Other error value? */
|
||||||
|
|
||||||
/* Read the even structure from the target. */
|
|
||||||
if (addr == 0)
|
if (addr == 0)
|
||||||
|
/* Nothing waiting. */
|
||||||
return TD_NOMSG;
|
return TD_NOMSG;
|
||||||
|
|
||||||
/* Read the even structure from the target. */
|
/* Read the event structure from the target. */
|
||||||
td_eventbuf_t event;
|
td_eventbuf_t event;
|
||||||
if (ps_pdread (ta->ph, (char *) addr + offsetof (struct pthread, eventbuf),
|
if (ps_pdread (ta->ph, (char *) addr + offsetof (struct pthread, eventbuf),
|
||||||
&event, sizeof (td_eventbuf_t)) != PS_OK)
|
&event, sizeof (td_eventbuf_t)) != PS_OK)
|
||||||
@ -73,12 +73,13 @@ td_ta_event_getmsg (const td_thragent_t *ta, td_event_msg_t *msg)
|
|||||||
|
|
||||||
/* Store the pointer in the list head variable. */
|
/* Store the pointer in the list head variable. */
|
||||||
if (ps_pdwrite (ta->ph, ta->pthread_last_event,
|
if (ps_pdwrite (ta->ph, ta->pthread_last_event,
|
||||||
addr, sizeof (struct pthread *)) != PS_OK)
|
&next, sizeof (struct pthread *)) != PS_OK)
|
||||||
return TD_ERR; /* XXX Other error value? */
|
return TD_ERR; /* XXX Other error value? */
|
||||||
|
|
||||||
/* Clear the next pointer in the current descriptor. */
|
/* Clear the next pointer in the current descriptor. */
|
||||||
|
next = NULL;
|
||||||
if (ps_pdwrite (ta->ph, (char *) addr + offsetof (struct pthread, nextevent),
|
if (ps_pdwrite (ta->ph, (char *) addr + offsetof (struct pthread, nextevent),
|
||||||
NULL, sizeof (struct pthread *)) != PS_OK)
|
&next, sizeof (struct pthread *)) != PS_OK)
|
||||||
return TD_ERR; /* XXX Other error value? */
|
return TD_ERR; /* XXX Other error value? */
|
||||||
|
|
||||||
return TD_OK;
|
return TD_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user