When the compiler passes an aggregate (class, struct, union, array, etc.) to a function it will always pass a pointer (the difference between passing by value, ref, or pointer is just language semantics). Given that, you should be able to typedef the struct in dtrace and then reference ((TextItem*) argN)->string (remember arg0 is the this pointer if it's a member function).

I don't know whether dtrace can handle member function declarations (it certainly can't call them!), so you may need to declare a struct type which shadows all the data members of TextItem.

Ryan

wynne wang wrote:
Hi

If we'd trace an input parameter, which is infact an C++ class , such as
TextItem, anyway we could trace the contents inside the TextItem ?

Example, it has a member named string, we'd get the contents of
TextItem.string.
Any advice?

Wynne

_______________________________________________
dtrace-discuss mailing list
[email protected]

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to