Hi,

Just wanted to confirm my understanding is correct

userland strcuture 

struct s2 {
   int i;
   char * c1;
}

struct s1 {
   int * i1;
   struct s2 *s;
}

if a pointer to s1 were to be passed to a function then

t1 = copyin(s1,4);
here t1 is dtrace pointer in the kernel address space; is this correct?

t2 = *t1  here you get the address of strcuture s1 

i2 = copyin(t2,4);
i2 => again a dtrace pointer

i3 = *t2 = interger pointer;
i4 =  i2->i1  (i4 has integer value)

i5 = copyin(t2+4,4)
i6 = *i5    i6 has the address of struct s2

i7 = i6-> i    value of i  in struct s2

is this correct? Thank you.
-- 
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to