I'm sorry, I posted this from the forum and didn't realize that the mailing 
list obviously wouldn't show the first post again. I pasted the original 
question below:

-----
Hey,

I need to read fields in kernel structures directly from memory (from within a 
simulator). Using mdb I can extract the necessary offset values for the 
different fields in different structures (like proc, kthread_t, ...).

My question is: how fixed are these offsets? Will they always be the same 
within a same kernel version? Does it depend on the structure instance as well? 
I noticed there are unions inside the structure I am interested in, does this 
make a difference? (How is union memory allocated?)

Is there a way to verify that the numbers mdb will give are correct? Can I for 
example calculate the actual offset of a field by counting the sizeof()s of the 
preceding fields from the source?

Thank you, Thomas
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[EMAIL PROTECTED]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to