Alex Peng
2008-Dec-08 08:40 UTC
[dtrace-discuss] Does DTrace have "-xmangled" to support C++? Apple has done that
Hi, To use DTrace on some C++ code, I found that Apple''s implementation had another option "-xmangled". Its usage could be found here: http://blog.mozilla.com/dmandelin/2008/02/14/dtrace-c-mysteries-solved/ And it could be found in Apple''s man page: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dtrace.1.html Is it possible to have that "mangled" option in DTrace? You know, some times there is no c++filt/dem/gc++filt installed, so it''s hard to follow http://developers.sun.com/solaris/articles/dtrace_cc.html. Thanks, -Alex -- This message posted from opensolaris.org
James McIlree
2008-Dec-08 22:51 UTC
[dtrace-discuss] Does DTrace have "-xmangled" to support C++? Apple has done that
On Dec 8, 2008, at 12:40 AM, Alex Peng wrote:> Hi, > > To use DTrace on some C++ code, I found that Apple''s implementation > had another option "-xmangled". > > Its usage could be found here: > http://blog.mozilla.com/dmandelin/2008/02/14/dtrace-c-mysteries- > solved/ > > And it could be found in Apple''s man page: > http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dtrace.1.html > > > Is it possible to have that "mangled" option in DTrace? You know, > some times there is no c++filt/dem/gc++filt installed, so it''s hard > to follow http://developers.sun.com/solaris/articles/dtrace_cc.html. > > Thanks, > -AlexI''d like to see if there were some reasonable way to "auto-detect" the mangling and not have to have a flag at all. I remember giving up on that last time when we added the -xmangled, but I can''t remember why now... It might get a bit confusing, as __ZSomeMangledName and UnmangledName will actually create two separate probes. Unless we force all input mappings to one state or the other, in which case you might get the odd effect of pid$target::__ZSomeMangledName:entry {} resulting in the UnmangledName probe firing. James M