offsetof (1) 썸네일형 리스트형 [LinuxKernel] Trace32(T32) How to use offsetof/container_of macro? OverviewWhen debugging ramdump with stability issues, I have been spending most of time casting various data structure as belows.v.v %s (struct task_struct*)0xC1917FCCFor this matter, I made several macros to minimize the debugging time.The definition of the macro is below.sYmbol.NEW.MACRO offsetof(type,member) ((int)(&((type*)0)->member))sYmbol.NEW.MACRO container_of(ptr,type,member) ((type *)(.. 이전 1 다음