Re: Valgrind for FreeBSD

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: Fri, 9 Apr 2004 20:20:47 -0400
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)
_at__at_ -2774,7 +2774,7 _at__at_

  /* 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));
Received on Fri Apr 09 2004 - 15:20:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:50 UTC