> Is it possible to get know endianness on the solaris target by using
> dtrace?

My first suggestion would be to find a C preprocessor directive that'd tell
you the answer.  Lacking that, you could do something like:

        #!/usr/sbin/dtrace -Cs

        /* Look for little-endian archs and set appropriately. */
        #ifdef i386
        #define LITTLE_ENDIAN
        #endif

        ::ip_input:entry
        {
        #ifdef LITTLE_ENDIAN
                printf("Little!\n");
        #else
                printf("Big!\n");
        #endif
                exit(0);
        }

Dan
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to