On Mar 12, 2008, at 12:27 AM, Paul Nasrat wrote:

>
> On 11 Mar 2008, at 23:19, James McIlree wrote:
>>
>>
>>> I was looking at mod_trace 
>>> (http://prefetch.net/projects/apache_modtrace/index.html 
>>> ) and playing with getting it to compile on OS X.
>>>
>>> When building for x86_64 with -arch x86_64 we get bad instructions  
>>> generated:
>>>
>>> gcc -o foo  -arch x86_64 foo.c
>>> /var/folders/rV/rV1x2DafFr0R6tGG+1bbk++++TM/-Tmp-//ccnykQ1o.s: 
>>> 11:bad register name `%%esi)'
>>>
>>
>>      The DTRACE_PROBE# macros are not supported on OS X. That is why  
>> you're running into issues.
>
> If they're not supported shouldn't I at least get a warning. Any  
> pointers to the right way to do things?
>
> I note that the root cause is actually a bad define in
>
> /usr/include/mach/i386/sdt_isa.h:
>
> #ifdef __x86_64__
>
> #define DTRACE_NOPS                     \
>        "nop"                   "\n\t"  \
>        "leal 0(%%esi), %%esi"  "\n\t"

        I thought we had #ifdef'd these so they wouldn't be available without  
some hackery,
but I'm not seeing the guards. Yes, you should have gotten a  
warning :-).

        I filed:

        <rdar://problem/5795255> Disallow use of DTRACE_PROBE macros

        James M

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to