[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Building Xen with structures thread_info/task_struct
Hello I disabled fast system calls, and i'm willing to log the systems calls performed on a VM. In order to understand better what did cause each syscall, i'm trying to link them with the PID of the process that is responsible of the call. To do so i get the ESP register, apply the mask 0xFFFFF000 and so i get the base address for the thread_info structure that defines the calling process. The first member of this structure is a task_struct structure which contains the PID of this process. These two structure are not redefined in x86 implementation of Xen, but they are in ia64 (and of course i'm in x86). I tried to redefine them, but as they are quite big, it's not straightforward and i always end up with structure for which gcc cannot determine their size (many complex types embedded). I tried to use the kernel headers of Dom0 in which they are defined but i get some troubles. When i include asm/thread_info.h, i get the following error In file included from traps.c:70: /usr/src/linux/include/asm/thread_info.h:10: warning: âstruct thread_infoâ declared inside parameter list /usr/src/linux/include/asm/thread_info.h:10: warning: its scope is only this definition or declaration, which is probably not what you want /usr/src/linux/include/asm/thread_info.h:11: warning: âstruct task_structâ declared inside parameter list traps.c: In function âdo_guest_trapâ: traps.c:429: error: storage size of âthread_infoâ isnât known traps.c:430: error: storage size of âtaskâ isnât known traps.c:475: error: invalid application of âsizeofâ to incomplete type âstruct thread_infoâ traps.c:476: error: invalid application of âsizeofâ to incomplete type âstruct task_structâ When i directly include the 32 bits version, asm/thread_info_32.h i don't have this scope problem anymore but gcc still is not able to determine the size of the structures traps.c: In function âdo_guest_trapâ: traps.c:431: error: storage size of âthread_infoâ isnât known traps.c:432: error: storage size of âtaskâ isnât known traps.c:477: error: invalid application of âsizeofâ to incomplete type âstruct thread_infoâ traps.c:478: error: invalid application of âsizeofâ to incomplete type âstruct task_structâ I've never had such problems before, and getting out of ideas. Anyone has an idea/solution ? Thanks Regards Fred _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |