tags:

views:

242

answers:

2

I have some custom dtrace probes in a C-library, and when linking and using the library with a C application my probes work fine, however when linked against C++ it says it can't find them. The reason seems to be because of C++ mangling, and trying to get it to work has become a duck chase.

Any ideas?

Note: Using gcc

+1  A: 

So far I've found these "useful" links

Using DTrace to Profile and Debug A C++ Program

Using DTrace SDT provider with C++

but they haven't solved my problems.

Later on I found these articles:

User-land tracing gets better and better //this was very helpful

Putting developer-defined DTrace probe points in an application

Dtrace Using SDT probes //pdf that helped understand some details, but information is old

Basically it all boils down to using dtrace -h to headerfiles from ones probes.d

Robert Gould
I found the link "User-land tracing gets better and better" invaluable.
Allen George
+1  A: 

Did you try extern "C" { ... } when declaring the C functions?

Brian Campbell