Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2015 10:17:13 +0200
From:      =?UTF-8?Q?Mikael_=C3=96stlund?= <mikael.ostlund.93@gmail.com>
To:        freebsd-dtrace@freebsd.org
Subject:   Static probing
Message-ID:  <CAGFZuoSC=yMMkOaNHvCU3nhEZov5z4P1Za-kzohEt6_TmjX21A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGFZuoSC=yMMkOaNHvCU3nhEZov5z4P1Za-kzohEt6_TmjX21A>