On 04/14/11 07:35 PM, Adam Leventhal wrote:
#!/usr/sbin/dtrace -I. -Cs
The kernel only picks up one argument from the #! line. You can use
#pragma incdir instead of the -I option.
I can't get this to work. If I remove the include line and header from
state.d and run it like this:
dtrace -I. -Cs state.d
it reports the same error:
dtrace: failed to compile script state.d: "./xlate.h", line 7: failed to
resolve type string: Unknown type name
Even if I remove the include <sys/types.h> from xlate.h and convert all
int<x>_t types to plain int it reports the same:
dtrace: failed to compile script state.d: "./xlate.h", line 5: failed to
resolve type string: Unknown type name
I also tried the incdir pragma option but this failed too:
$ cat state.d
#pragma D option incdir=.
#pragma D option cpp
#include "xlate.h"
BEGIN
{
printf("%s", state_string[1]);
}
$ dtrace -s state.d
dtrace: failed to compile script state.d: line 1: failed to set option
'incdir' to '.': Option cannot be used from within a D program
Maybe I should try to avoid the string type ?
v.
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org