Hi,

The output is:

             0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
         0: 00 77 83 ef 87 0a e1 11 a4 7b 00 50 56 80 00 d0  .w.......{.PV...
        10: 00 00 00 00                                      ....
                1



Thanks,
Mehul

-----Original Message-----
From: Jonathan Adams [mailto:jonathan.ad...@oracle.com] 
Sent: 09 November 2011 00:27
To: Mehul Choube
Cc: dtrace-discuss@opensolaris.org
Subject: Re: [dtrace-discuss] concatenate structure members into one variable

On Tue, Nov 08, 2011 at 03:48:17AM -0800, Mehul Choube wrote:
> Hi,
> 
> I want the guid in a variable. I tried stringof(), strjoin(), copyinstr() but 
> none works :(
> 
> D script:
> 
> =======
> 
> #!/usr/sbin/dtrace -s
> 
> #pragma D option quiet
> 
> typedef struct GUID {
>         unsigned long Data1;
>         unsigned long Data2;
>         unsigned long Data3;
>         unsigned char Data4[8];
> }GUID_t;
> 

Have you tried:

pid$1::*myFunc*:entry
{
        this->ptr = arg1;
        this->sptr = (GUID_t *)copyin(this->ptr, sizeof(GUID_t));

        @a[*this->sptr] = count();
        ^^^^^^^^^^^^^^^^^^^^^^^^^
}

Cheers,
- jonathan

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

Reply via email to