From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 8 07:24:53 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 071AA106564A; Sat, 8 Oct 2011 07:24:53 +0000 (UTC) (envelope-from omerfsen@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9D68FC14; Sat, 8 Oct 2011 07:24:52 +0000 (UTC) Received: by qyk4 with SMTP id 4so4699839qyk.13 for ; Sat, 08 Oct 2011 00:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1BGL3vhTV7OrO5mtiyvjHyF0VMDPBKaSN2RMbEK4JZA=; b=wHHMBZX0yZ/eU2AvgDIaotoqtFYN/mnqixMn8oY8QRyvwOvtXjooQuHwTRsBeWUR3l VS7Yll21gJzNadI029hwxcbf/WFHr2QuJ21RvaUjHYYj8Ixbk//cjnhj0OmawGmqrwML JIx+OB5DLTi1DS1qb5u17zu5pJqeqKJnDAGgU= MIME-Version: 1.0 Received: by 10.229.241.135 with SMTP id le7mr2149933qcb.149.1318057064315; Fri, 07 Oct 2011 23:57:44 -0700 (PDT) Received: by 10.229.51.130 with HTTP; Fri, 7 Oct 2011 23:57:44 -0700 (PDT) In-Reply-To: References: <4E8F400D.80305@gmail.com> Date: Sat, 8 Oct 2011 09:57:44 +0300 Message-ID: From: Omer Faruk SEN To: mdf@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, romain@freebsd.org Subject: Re: Using Valgrind on FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2011 07:24:53 -0000 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 # # $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 > 2011/10/7 Mustafa Re=C5=9Fit =C5=9Eahin : > > 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= " >