Reputation: 69855
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
Upvotes: 3
Views: 2018
Reputation: 69855
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
Upvotes: 2
Reputation: 332856
Did you try extern "C" { ... }
when declaring the C functions?
Upvotes: 1