On Wed, Apr 07, 2010 at 06:15:22PM +0200, Mark Phalan wrote:
> But this isn't about user-land data. The structs I'm talking about
> are dtrace native structs defined in the d script. In the example I
> gave I wasn't even tracing a program - it was pure d. CTF data
> doesn't come into it...
Duh. Well, this works:
2 typedef struct complex {
3 uint32_t simplevalue;
4 } complex_t;
5
6 translator complex_t < uint32_t x > {
7 simplevalue = x;
8 };
9
10 dtrace:::BEGIN {
11 printf("simplevalue: %d\n", xlate <complex_t>(2).simplevalue);
12 }
I couldn't get your example to work.
_______________________________________________
dtrace-discuss mailing list
[email protected]