> So, can you give me a set of commands that will (say) cause cpp to
> process my files into vanilla D code, then tell dtrace to use that
> code?  BTW, many thanks for all the help, guys!

cpp d4.d worked for me, given the right cpp.  cc -E may well work too.

However, here's an example of why cpp matters:

[EMAIL PROTECTED]> which cpp
/usr/sfw/bin/cpp
[EMAIL PROTECTED]> cpp d4.d
# 1 "d4.d"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "d4.d"
# 1 "m4.d" 1
# 2 "d4.d" 2

syscall::chmod:entry { self->arg 1 = arg 1; self->arg 0 = arg 0; self->follow = 
1; }

Note the evil spaces in "arg 1" and "arg 0".

Now, if we edit those /**/ to ##, and use 'cc -E' which does ANSI preprocessing,
we get

[EMAIL PROTECTED]> cc -E d4.d
# 1 "d4.d"
# 1 "m4.d"
# 7

# 2 "d4.d"

  syscall : : chmod : entry   {  self -> arg1 = arg1 ; self -> arg0 = arg0 ; 
self -> follow = 1 ; }
#ident "acomp: Sun C 5.8 Patch 121016-05 2007/01/10"

which probably works better.

Maybe there's a switch to whatever cpp you're using that will make it do ANSI 
cpp, and you can use ## too?  or a switch to make /**/ compress away rather 
than 
substitute whitespace?
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to