Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Oct 2011 09:57:44 +0300
From:      Omer Faruk SEN <omerfsen@gmail.com>
To:        mdf@freebsd.org
Cc:        freebsd-hackers@freebsd.org, romain@freebsd.org
Subject:   Re: Using Valgrind on FreeBSD
Message-ID:  <CAG%2Br6L9S2y1uBtd5hL_p4JXA9UBw1kNK_rBroZ2s7VyR7jQ_ng@mail.gmail.com>
In-Reply-To: <CAMBSHm-hPSV0XGL2MiZAATEOPxg7_vSGdPNUCATiqcxnAE8C8A@mail.gmail.com>
References:  <4E8F400D.80305@gmail.com> <CAMBSHm-hPSV0XGL2MiZAATEOPxg7_vSGdPNUCATiqcxnAE8C8A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

May it be related with the patches for Valgrind that
http://people.freebsd.org/~romain/valgrind/ written? It may require to
rebuild valgrind with that patch but I am not sure. Maybe Romain can answer
that question. Romain I have tried to use your patches against latest
valgrind port:

# Date created:                         April 19 2004
# Whom:                                 Simon Barner <barner@gmx.de>
#
# $FreeBSD: ports/devel/valgrind/Makefile,v 1.50 2011/04/27 09:51:08 stas
Exp $
#

PORTNAME=3D       valgrind
PORTVERSION=3D    3.6.1
PORTREVISION=3D   2
PORTEPOCH=3D      1


but I got

cc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_amd64=3D1
-DVGO_freebsd=3D1 -DVGP_amd64_freebsd=3D1 -I../coregrind
-DVG_LIBDIR=3D"\"/usr/local/lib/valgrind"\" -DVG_PLATFORM=3D"\"amd64-freebs=
d\""
-m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -O2 -pipe
-funroll-loops -fno-strict-aliasing -Wno-pointer-sign -fno-stack-protector
-MT libcoregrind_amd64_freebsd_a-syswrap-freebsd.o -MD -MP -MF
.deps/libcoregrind_amd64_freebsd_a-syswrap-freebsd.Tpo -c -o
libcoregrind_amd64_freebsd_a-syswrap-freebsd.o `test -f
'm_syswrap/syswrap-freebsd.c' || echo './'`m_syswrap/syswrap-freebsd.c
m_syswrap/syswrap-freebsd.c:3989: error: '__NR_mq_open' undeclared here (no=
t
in a function)
m_syswrap/syswrap-freebsd.c:3989: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3989: error: (near initialization for
'vgModuleLocal_syscall_table')
m_syswrap/syswrap-freebsd.c:3990: error: '__NR_mq_getsetattr' undeclared
here (not in a function)
m_syswrap/syswrap-freebsd.c:3990: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3990: error: (near initialization for
'vgModuleLocal_syscall_table')
m_syswrap/syswrap-freebsd.c:3991: error: '__NR_mq_timedreceive' undeclared
here (not in a function)
m_syswrap/syswrap-freebsd.c:3991: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3991: error: (near initialization for
'vgModuleLocal_syscall_table')
m_syswrap/syswrap-freebsd.c:3993: error: '__NR_mq_timedsend' undeclared her=
e
(not in a function)
m_syswrap/syswrap-freebsd.c:3993: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3993: error: (near initialization for
'vgModuleLocal_syscall_table')
m_syswrap/syswrap-freebsd.c:3994: error: '__NR_mq_notify' undeclared here
(not in a function)
m_syswrap/syswrap-freebsd.c:3994: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3994: error: (near initialization for
'vgModuleLocal_syscall_table')
m_syswrap/syswrap-freebsd.c:3995: error: '__NR_mq_unlink' undeclared here
(not in a function)
m_syswrap/syswrap-freebsd.c:3995: error: array index in initializer not of
integer type
m_syswrap/syswrap-freebsd.c:3995: error: (near initialization for
'vgModuleLocal_syscall_table')
gmake[3]: *** [libcoregrind_amd64_freebsd_a-syswrap-freebsd.o] Error 1
gmake[3]: Leaving directory
`/usr/ports/devel/valgrind/work/valgrind-freebsd-3.6.1-2/coregrind'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/usr/ports/devel/valgrind/work/valgrind-freebsd-3.6.1-2/coregrind'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/usr/ports/devel/valgrind/work/valgrind-freebsd-3.6.1-2'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/devel/valgrind.
*** Error code 1

Stop in /usr/ports/devel/valgrind.


2011/10/7 <mdf@freebsd.org>

> 2011/10/7 Mustafa Re=C5=9Fit =C5=9Eahin <resitsahin@gmail.com>:
> > I am trying to run Valgrind on FreeBSD. I am getting the error about
> > ksem_open which i stated below. I have searched for  a solution to be
> able
> > to solve this problem and found the calgrind patch. I could not found t=
he
> > instructions to apply this patch. How can i use valgrind on FreeBSD wit=
h
> > ksem_open enabled?
>
> It looks like that syscall is only available when the
> P1003_1B_SEMAPHORES option is in your kernel config.  You will need to
> edit a kernel configuration file and rebuild / reinstall the kernel.
>
> Thanks,
> matthew
>
>
> > I use valgrind version:  valgrind-3.6.0
> > FreeBSD Version :FreeBSD 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #6:  amd=
64
> >
> > The error i get : (The valgrind output)
> >
> >
> > --84521-- WARNING: unhandled syscall: 404
> > =3D=3D84521=3D=3D    at 0x144E2BC: __sys_ksem_init (in /lib/libc.so.7)
> > =3D=3D84521=3D=3D    by 0x14422FE: sem_init (in /lib/libc.so.7)
> > =3D=3D84521=3D=3D    by 0x1639BBB: snf__sem_ring_open (in
> > /usr/local/opt/snf/lib/libsnf.so.0.3)
> > =3D=3D84521=3D=3D    by 0x163A1AC: snf__open_endpoint_ring (in
> > /usr/local/opt/snf/lib/libsnf.so.0.3)
> > =3D=3D84521=3D=3D    by 0x163A5A3: snf__board_open (in
> > /usr/local/opt/snf/lib/libsnf.so.0.3)
> > =3D=3D84521=3D=3D    by 0x1637A7A: snf_open (in
> > /usr/local/opt/snf/lib/libsnf.so.0.3)
> > =3D=3D84521=3D=3D    by 0xF04DBA: snf_activate (in
> > /usr/local/opt/snf/lib/libpcap.so.1.1.1)
> > =3D=3D84521=3D=3D    by 0xF05C26: pcap_activate (in
> > /usr/local/opt/snf/lib/libpcap.so.1.1.1)
> > =3D=3D84521=3D=3D    by 0xF0624A: pcap_open_live (in
> > /usr/local/opt/snf/lib/libpcap.so.1.1.1)
> > =3D=3D84521=3D=3D    by 0x452B4D: ??? (in /usr/sbin/tcpdump)
> > =3D=3D84521=3D=3D    by 0x402E4D: ??? (in /usr/sbin/tcpdump)
> > =3D=3D84521=3D=3D    by 0x41FFF: ???
> > --84521-- You may be able to write your own handler.
> > --84521-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
> > --84521-- Nevertheless we consider this a bug.  Please report
> > --84521-- it at http://valgrind.org/support/bug_reports.html.
> > _______________________________________________
> > freebsd-hackers@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "
> freebsd-hackers-unsubscribe@freebsd.org"
> >
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=
"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG%2Br6L9S2y1uBtd5hL_p4JXA9UBw1kNK_rBroZ2s7VyR7jQ_ng>