Valgrind for FreeBSD
Garrett Rooney
rooneg at electricjellyfish.net
Fri Apr 9 17:20:58 PDT 2004
On Apr 9, 2004, at 7:07 AM, Doug Rabson wrote:
> As some of you might be aware, recently I've been working on porting
> the
> excellent valgrind debugger to FreeBSD (both -stable and -current). If
> you are interested in trying it out, you can find details on how to get
> the latest version at http://www.rabson.org/#valgrind. Enjoy...
For anyone trying to build on FreeBSD 5.1, it requires a small tweak,
since libc_r in that version did not have support for
pthread_spinlock_t's. I believe this is the correct change, since
__FreeBSD_version 501107 seems to be the next bump after the addition
of pthread_spinlock_t support.
-garrett
Index: coregrind/arch/x86-freebsd/vg_libpthread.c
===================================================================
--- coregrind/arch/x86-freebsd/vg_libpthread.c (revision 325)
+++ coregrind/arch/x86-freebsd/vg_libpthread.c (working copy)
@@ -2774,7 +2774,7 @@
/* POSIX spinlocks, taken from glibc linuxthreads/sysdeps/i386 */
-#if __FreeBSD__ == 5
+#if __FreeBSD_version >= 501107
int pthread_spin_init(pthread_spinlock_t *lockp, int pshared)
{
struct pthread_spinlock *lock = my_malloc(sizeof(struct
pthread_spinlock));
More information about the freebsd-current
mailing list