[DTrace-devel] [PATCH 04/12] Fix the -xcpp option

Eugene Loh eugene.loh at oracle.com
Sat Jul 16 02:37:17 UTC 2022


First of all, sorry for screwing up the Reply-to: stuff.  A number of 
posted patches never appeared in my inbox.  So I'm posting my reviews as 
fresh email threads in those cases.

For this one:
     Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
since it's good enough as is.

Nonetheless, I wanted to run an alternative by you.  If I understand 
correctly, we want dtrace options -C and -xcpp to be exactly the same 
thing.  So why not make them the same thing "at inception" rather than 
carrying them around separately and then trying to make them equivalent 
at the point of usage?

That is, how about replacing this patch with a "one-line" fix?  In 
cmd/dtrace.c, in the -x processing, add the statement:
         if (strcmp(optarg, "cpp") == 0)
                 g_cflags |= DTRACE_C_CPP;
I think that eliminates the need for the DTRACE_C_DLIB stuff.  I 
understand there is something a little weird about doing this in the -x 
processing, but the reality is that the weirdness is dtrace's way of 
handling these options -- the proposed addition is simply the most 
direct way of dealing with this.




More information about the DTrace-devel mailing list