PERFORCE change 55983 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Jun 27 22:51:37 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=55983
Change 55983 by marcel at marcel_nfs on 2004/06/28 05:50:40
Don't do arithmetic on void *. I manually tweaked <sys/procfs.h>
locally, so missed the breakage.
Affected files ...
.. //depot/projects/gdb/lib/libthread_db/td_ta_thr_iter.c#3 edit
.. //depot/projects/gdb/lib/libthread_db/td_thr_get_info.c#3 edit
Differences ...
==== //depot/projects/gdb/lib/libthread_db/td_ta_thr_iter.c#3 (text+ko) ====
@@ -50,7 +50,8 @@
while (th.th_thread != NULL) {
if (cb(&th, data) != 0)
return (TD_OK);
- addr = th.th_thread + ta->ta.libc_r.offset_next;
+ addr = (psaddr_t)((uintptr_t)th.th_thread +
+ ta->ta.libc_r.offset_next);
err = ps_pread(ta->ta_ph, addr, &th.th_thread,
sizeof(th.th_thread));
if (err != PS_OK)
==== //depot/projects/gdb/lib/libthread_db/td_thr_get_info.c#3 (text+ko) ====
@@ -43,7 +43,8 @@
ti->ti_ta = ta;
switch (ta->ta_lib) {
case PTHREAD_LIBC_R:
- addr = th->th_thread + ta->ta.libc_r.offset_uniqueid;
+ addr = (psaddr_t)((uintptr_t)th->th_thread +
+ ta->ta.libc_r.offset_uniqueid);
err = ps_pread(ta->ta_ph, addr, &ti->ti_tid,
sizeof(thread_t));
ti->ti_tid++;
More information about the p4-projects
mailing list