Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2004 05:51:35 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 55983 for review
Message-ID:  <200406280551.i5S5pZaM036579@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=55983

Change 55983 by marcel@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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406280551.i5S5pZaM036579>