From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 3 08:17:18 2015 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 923BD460 for ; Wed, 3 Jun 2015 08:17:18 +0000 (UTC) (envelope-from mikael.ostlund.93@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 353FD19E8 for ; Wed, 3 Jun 2015 08:17:15 +0000 (UTC) (envelope-from mikael.ostlund.93@gmail.com) Received: by wiga1 with SMTP id a1so5153080wig.0 for ; Wed, 03 Jun 2015 01:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vnovDZMd2sf0vtSmWUypUIVnji5NfBAarWz6xttP42U=; b=YNmvZe4WhoDgVTE0kcNddCKxM8xxbJI22SOHzJDi4oGbyTJHhRRjfVKLdHmHmJLtGu L6WZqa58Wh0m6YUSG1id+CMZlXQbSOJ3Km1OsVJ3qluJfeUVVd4Ymo27MJIL9NvaB1ac FCDu44m1obITRe7KFAbYeWPHmsnVbhhWKLMuTyiIITyYNSNvwMGsUHf/FZWp92XLjXVp 7hsUCEbZ8/kpJ9ZJ0TQpJhOCXngd2w9KKIMZNfNvUzQlEEx50Y7+eJM18wTqP9HlF6DG GttY2iXnCTRrqPe8OgBbiSuBVUGAPGzD2e1N/VCtVyhTfrkyw69C2vc+48T6DIqkfFQW XYmA== MIME-Version: 1.0 X-Received: by 10.180.103.227 with SMTP id fz3mr39367439wib.45.1433319433621; Wed, 03 Jun 2015 01:17:13 -0700 (PDT) Received: by 10.28.97.66 with HTTP; Wed, 3 Jun 2015 01:17:13 -0700 (PDT) Date: Wed, 3 Jun 2015 10:17:13 +0200 Message-ID: Subject: Static probing From: =?UTF-8?Q?Mikael_=C3=96stlund?= To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 08:17:18 -0000 Hello, I'm experimenting with DTrace on my system and I'm not able to use static probing in my code. Here's my c code: #include "provider.h" int main(void) { TESTPROVIDER_TEST_START("hello"); return (0); } And here's my provider.d file: provider testprovider { probe test__start(char *); probe test__done(char *); }; This is the error message I get when I try to compile my c file: # gcc dtracetest.c /tmp//ccjWNu6v.o: In function `main': dtracetest.c:(.text+0xa): undefined reference to `__dtrace_testprovider___test__start' collect2: error: ld returned 1 exit status (Same message no matter what compiler I try), any ideas?